ivybeibeidn

2022-09-06

Having trouble finding the solution to ${e}^{x}-3{e}^{-x}-4x=0$. The answer is roughly $2.2$ but am not sure how to get there?

Quinn Alvarez

Let $f\left(x\right)={e}^{x}+3{e}^{-x}-4x$
Find $a,b$ such that $a and either $f\left(a\right)<0 or $f\left(a\right)>0>f\left(b\right)$ (i.e. find two points such that the function changes sign between them, meaning there is a solution somewhere in that interval - this only works because $f$ is a continuous function).
Take $c=\frac{1}{2}\left(a+b\right)$. If $f\left(c\right)=0$ then 𝑐 is the desired zero, and you can stop. Or, if $f\left(c\right)$ is smaller than the error you're willing to accept, then it's your approximation and you can stop.
Find the sign of $f\left(c\right)$. If $f\left(a\right)$ and $f\left(c\right)$ have the same sign, set $a:=c$, otherwise set $b:=c$ (i.e. pick a new $a$ and $b$ such that you still know that the zero is between them).
Go back to step $2$ with your new $a$ and $b$.

Do you have a similar question?