# Number of solutions of transcendental equation

#### idontknow

Find how many solutions the equation has ?
$$\displaystyle x^2 -2x =(-1)^x \; , x\in \mathbb{Z}.$$

#### DarnItJimImAnEngineer

Easy. Solve $x^2-2x=1$ and eliminate solutions that aren't even integers. Solve $x^2-2x=-1$ and eliminate solutions that aren't odd integers. Whatever remains is your answer.

2 people

#### idontknow

Here is the proof without solving the equations :

We can simply set $$\displaystyle x=(-1)^{t}$$ and $$\displaystyle x-2=(-1)^{r}$$ but it can be done easily below:

Since $$\displaystyle x^2 -2x = x(x-2)$$ then $$\displaystyle -1\leq (x,x-2) \leq 1$$ or $$\displaystyle x=(-1)^{t}$$ and $$\displaystyle x-2=(-1)^{t}-2<0$$.
$$\displaystyle x-2<0$$ means $$\displaystyle (-1)^{t-x} <0$$.
The only negative value $$\displaystyle (-1)^{t-x}$$ can take is -1.(if it exists, from now there is one solution or 0)

Now we must prove that the solution exists.

$$\displaystyle 1=2(-1)^{t}+(-1)^{x}=(-1)^{x}[2(-1)^{t-x}+1]$$.

$$\displaystyle \begin{cases} (-1)^{-x}=(-1)^{x}=2(-1)^{t-x}+1 \\ (-1)^{t-x}<0\equiv (-1)^{t-x}=-1 \end{cases}$$.

$$\displaystyle (-1)^{x}=-1$$ means that the equation $$\displaystyle x^2 -2x=(-1)^{x}$$ has only one solution.

Last edited:
1 person

#### v8archie

Math Team
On the other hand, DarnItJimImAnEngineer's solution is very straightforward.

$x^2-2x+1 = (x-1)^2 = 0$ has a single (repeated) solution at $x=1$ and since $(-1)^1=-1$ this is indeed a solution of the original equation.
$x^2-2x-1 = 0$ quite obviously does not have integer solutions (because $b^2-4ac = 8$ which is not a square number), so there are no solutions for even $x$.

Your statement that $x$ and $x-2$ must both be between $-1$ and $1$ is somewhat confusing - it would appear at first glance that value of non-unit magnitude for one expression would require the other to be outside that range. However, it does lead to an easier proof.

$$x^2-2x = (-1)^x \implies |x^2-2x| = |x(x-2)| = 1$$

Since $x \in \mathbb Z$, $(x-2) \in \mathbb Z$ too and thus the only possible solution is when $|x| = |x-2| = 1$ (because there are no non-zero integers with a magnitude less than 1). and this clearly happens only when $x=1$.

However, since both this method and yours require factoring the LHS of the equation, they are not, in general significantly easier than DarnItJimImAnEngineer's solution. Take $x^{2}-13x=30(-1)^{x}$ as an example, or $x^2-5x+5 = (-1)^x$. The second of these doesn't easily yield to methods other than that of DarnItJimImAnEngineer.

Last edited:
3 people

I agree .

#### idontknow

Another method for this case may work .
$$\displaystyle \displaystyle x^2 -2x =(-1)^x \; , x\in \mathbb{Z}.$$.
$$\displaystyle (-1)^{-x}=(-1)^{x}=\frac{1}{-x(-x-2)} \in \mathbb{Z}$$.
$$\displaystyle x(x+2)\; | \; 1 \Rightarrow \begin{cases} x|1 \\ (x+2)|1 \equiv x|(-1) \end{cases}$$ .
Hence $$\displaystyle x<0$$ and x divides $$\displaystyle 1$$ means there is only one solution.

Last edited:
1 person

#### topsquark

Math Team
Another method for this case may work .
$$\displaystyle \displaystyle x^2 -2x =(-1)^x \; , x\in \mathbb{Z}.$$.
$$\displaystyle (-1)^{-x}=(-1)^{x}=\frac{1}{-x(-x-2)} \in \mathbb{Z}$$.
$$\displaystyle x(x+2)\; | \; 1 \Rightarrow \begin{cases} x|1 \\ (x+2)|1 \equiv x|(-1) \end{cases}$$ .
Hence $$\displaystyle x<0$$ and x divides $$\displaystyle 1$$ means there is only one solution.
The method still works, but you have an extra negative sign. It should be
$$\displaystyle (-1)^x = \dfrac{1}{-x( -x + 2) }$$

-Dan

1 person

#### idontknow

Method 3: $$\displaystyle (-1)^{x}$$-odd , $$\displaystyle 2x$$-even , then $$\displaystyle x^2$$-odd or $$\displaystyle x$$-odd. So $$\displaystyle x=(2p-1)$$.
$$\displaystyle (2p-1)^{2} +2(2p-1)=4p^{2}-4p+1+4p-2=(-1)^{2p-1}=-1$$.
$$\displaystyle 4p^{2} -1=-1$$ or $$\displaystyle p^{2}=0$$ proves there is only one solution(p=0). x=2p-1=-1.