00:01
Here we're going to look at newton's method for finding the root of a function of one variable.
00:10
So let's say you have a function f of x, and you would like to find its roots.
00:20
What we're going to start with is the taylor series approximation of this function expanded about point x0.
00:32
So some point nearby, hopefully a root.
00:38
So that function is approximately equal to at that point, plus the derivative evaluated at that same point times the difference between x and x0.
00:57
And here we would like to have this approximation for the root.
01:04
So we're going to set 0 on the left -hand side and solve for the root itself.
01:19
So if we rearrange this equation, we'll bring over f of x0, and we'll call this derivative just f -prime evaluated at x -0, and then we add the x -0.
01:40
And this is supposedly going to give us the x of the root.
01:47
So yeah, that's what we're looking for.
01:51
This is actually an iterative procedure.
01:54
So you have an initial guess, and it could be quite far off, but you are going to use the slope of the function until you get closer and closer to that actual root.
02:11
So it's an iterative process.
02:15
And it will work with a smooth function with no singularities in the region of interest.
02:26
There is one downfall of this, is that the root that you wind up finding is going to be the one nearest your initial guess.
02:45
So as an example of this procedure, we are going to try to determine the angle to shoot a projectile, so that it lands in a certain position with a certain initial speed.
03:03
We see here the function we are plotting that t is an angle.
03:08
So i'll write it here as function of theta is 843 times tangent of theta.
03:23
And we want some precision in our results.
03:27
So we'll go ahead and write out some of these times tangent of theta.
03:30
Numbers to a high precision.
03:33
So that is not the trajectory of the particle.
03:36
It is this function for which you are trying to find the roots.
03:42
We're trying to land at a spot 843 units away, we'll say meters away from the launch point, and the initial speed was 100 meters per second.
03:57
So that's where this function comes from.
04:01
We can see that there are two routes where this function crosses zero.
04:07
Our initial guess is going to be very bad.
04:11
It's going to be theta zero is our initial guess.
04:17
And yeah, that's not very good, but we can see that the root that we're going to hone in on is the first route.
04:28
We would have to guess something over theta equals 1.
04:33
The other thing to realize is that the theta we're going to be using is in radiance, not degrees.
04:44
So the only other thing we need is the derivative of that function, or the derivative with respect to theta in order to go through our iteration.
04:58
And so that would give us 843 times the derivative of tangent of theta with respect to theta...