I was watching 3Blue1Brown playlist of derivatives and integrals, after learning and understanding the visualization of those topics, I wanted to play around with the math.
Introduction to the problem
This problem seems very easy, but after a lot of trying I just couldn't get the result, I talked to my colleagues and they couldn't work out a solution, I tried to talk and solve with math students but things didn't flow smoothly.
So what is my problem? I took some equation and I wanted to find for which value X, the slope is -1?
We need to do the following things:
- Calculate the derivative of the function.
- Compare the derivative of the function to the slope we want to find, which is -1.
- Check what value of X satisfies the equation.
Original function: $f(x) = e^{x^2}$
Derivative function: $f'(x) = 2xe^{x^2}$
Compare derivative function to the slope: $2xe^{x^2} = -1$
Attempt 1 to solve the problem
At this moment things start to be complicated, how do I manage to find X? So far I tried to use log rules and play with it to get X, but nothing worked, for example:
$2xe^{x^2} = -1$
$xe^{x^2} = -1/2$
$ln(xe^{x^2}) = ln(-1/2)$
The problem here is that $ln(-1/2)$ is not defined, so this method is not good.
Attempt 2 to solve the problem
Another approach that I a friend suggested me to do is to use "Euler's formula", which says $e^{ix} = cos(x)+isin(x)$, and then maybe do something with the complex number at the power of $e$ and get a result, but I can't see what I can tweak in this formula to fit it to my problem.
So this method is not good too.
Some visualizations about the problem
So I decided to go to desmos graphs and see how those functions look like to get an understanding of what I need to do.
This is the graph of $f(x) = e^{x^2}$
This is the derivative graph of $f'(x) = 2xe^{x^2}$
And this is how the graph looks like with the original graph ($f(x) = e^{x^2}$) and the derivative graph ($f'(x) = 2xe^{x^2}$), at this image I use Wolfram to figure out what is the X point to get the result.
What Wolfram says
As you can see when I use Wolfram to calculate it for me, Wolfram got an approximate number for variable X which is x=-0.41936, but there are no steps how he calculated it.
More thoughts
so I thought maybe I can use Taylor Series here, but then I remembered that I can use Taylor Series to approximate the value around some value X, how can I apply this for getting the X for requested slope which is -1?
Maybe this approach is also wrong, that's why I am here and asking you guys, how to know at what X number the slope of the function is -1?
Thank you very much!
Eventually, I understood how to solve this problem by Gerry Myerson help, Gerry suggested using Newton's Method and it worked perfectly. I will provide the results of this method so future people who see this post will see the results also.
Thank you very much, Gerry Myerson!
This is Wikipedia explanation for Newton's Method, as you can see there we need to get the result by step by step calculations.
$Xn+1 = Xn - f(Xn)/f'(Xn)$
When we try to get the approximate value for our equation, the equation is the derivative of the first equation, so we will work with the equation $f(x) = 2xe^{x^2} + 1 = 0$
So at some point we need to calculate the derivative of the equation $f(x) = 2xe^{x^2} + 1 = 0$, therefore let's calculate it now and it will be $f'(x) = e^{x^2}(2+4x^2)$.
All we need to do now is to plug in the numbers a few times and we get approximate of the result we need.
$X0 = 1$.
$X1 = 1 - f(1)/f'(1) = 0.6054$
$X2 = 0.6054 - f(0.6054)/f'(0.6054) = 0.0560$
$X3 = ...$
$X4 = ...$
$X5 = ...$
$X6 = -0.4194 - f(-0.4194)/f'(-0.4194) = -0.4194$
As you can see from my question the approximate number is x=-0.41936, and from Newton Method, we got the same approximation x=-0.4194.
Thanks again for Gerry Myerson for the help and there we have the solution :)