Solving an equation with trigonometric and exponential functions

3.6k Views Asked by At

While tutoring about integration and derivatives of functions, we needed to determine what the biggest distance between two functions, one trigonometric $f(x)$, the second exponential $h(x)$ for value of $x$ between 0 and 1. For that he had to use his calculator.

But I wondered if one could find it manually, so I derivated the function $d(x) = f(x) - h(x)$ into:

$$d'(x) = 2cos(\pi x)-e^{-2x}+1$$

In order to find out the value where $d'(x)=0$.

My first instinct was to use the formula $cos(\theta)=\frac{e^{i\theta}+e^{-i\theta}}{2}$ and then try to solve the equation for $u=e^x$ but then I get the following equation:

$$u^{i\pi}+u^{-i\pi}+u^{-2}+1=0$$

And this is far from the polynomial I used to solve in school. Am I totally off course? Is there no way to solve this manually?

EDIT: I already had great answer which pointed me to doing it the numerical way, as it seems that it isn't doable analytically. But was it ever proven that it isn't possible? Or is there simply no known method to this day to do it analytically?

2

There are 2 best solutions below

4
On BEST ANSWER

Equations which mix polynomial and trigonometric terms do not show analytical solutions (this is already the case for $x=\cos(x)$) and numerical methods are required.

The simplest is probably Newton method : starting from a "reasonable" guess $x_0$, the method updates it according to $$x_{n+1}=x_n-\frac{F(x_n)}{F'(x_n)}$$ Let me consider the case where $$F(x)= 2\cos(\pi x)-e^{-2x}+1$$ $$F'(x)=2 e^{-2 x}-2 \pi \sin (\pi x)$$ and let us use $x_0=\frac 12$. The method generates the following iterates $$x_1=0.613948434899191$$ $$x_2=0.615142392661493$$ $$x_3=0.615143169609597$$ $$x_4=0.615143169609929$$ which is the solution for fifteen significant figures.

The first estimate is already quite good for a manual work.

2
On

If you plot $d'(x)$ you will see that it has many zeros. As $e^{-2x}$ is small for large $x$, the zeros will approximate the solutions of $2\cos(\pi x)=-1$ that is $x_n \approx 2n +\frac{2}{3}\,$ with integer $n$. Examples: For $n=1,2,3,9\;$ you get

$$d'(x_1) = -0.0048279499938$$ $$d'(x_2) = -0.0000884269887$$ $$d'(x_3) = -0.0000016195968$$ $$d'(x_9) = -0.6114195798463\times 10^{-16}$$

You can use these approximate zeros and refine them with e.g. Newton iterations.