00:01
Hey everyone, so today we're going to be taking look at a pendulum of varying length.
00:06
So this problem is actually pretty nice to us.
00:08
It gives us the differential equation we're going to solve before we even start, so we don't have to mess around with newton's laws or anything like that.
00:18
So even though it's going to be, we're just going to plug it in.
00:22
I have my rungay kuta method solver up here.
00:26
We're going to be doing this numerically on the computer.
00:30
Still always is a good idea to start any differential equation problem by writing down your initial conditions.
00:38
So for this, we are given that theta of zero, theta of zero equals .05.
00:51
And we are given that theta prime of zero, so the first derivative of theta, is just going to be zero.
01:00
So the angle is not changing at time equals zero.
01:02
Now, this problem is, it can be a little misleading because we have two functions of t, we have theta, and we have l, but we are explicitly given l, so there's no need to solve for it.
01:12
So just keep in mind that we are solving this differential equation to figure out explicitly what the function theta of t is.
01:20
And you'll see in the equation i've subbed in, they give us that g equals 1, so just to make it easy, i've already put that there.
01:29
Right, so next, we're not going to need it.
01:32
Right yet but they do give us l and we are going to need to enter it into our rungay kuta method calculator so just to have it later we can write l of t equals and subbing in for constants again 1 plus 0 .1 cost of t minus 0 .02 now you'll see we also have an an l prime in an l squared term, but because we are explicitly given l of t, those are fairly straightforward to solve for, but we will need to know them, so just quickly doing that.
02:14
So l prime of t, so 1 is a constant, so that's going to go to 0, and then cosine of t minus 0.
02:23
The argument is linear, so we can just treat it as a regular variable as though it were t and then plug in the minus 0 .02.
02:30
So that's negative 0 .1.
02:35
Sine t minus 0 .02.
02:41
And then l squared, i'm going to save you all the algebra.
02:46
You can check and make sure you got what i got, but l squared of t equals 1 plus 0 .01 cosine squared of 2 of t.
03:04
Minus .02, running out of room here, plus .2 cosine of t minus.
03:27
And that's messy, but we won't have to deal with it besides plugging it in.
03:32
Okay, so the next thing we need to do is get it into the desired form for the calculator that we have chosen.
03:42
So all of them are going to be a little different, but almost all of them, in fact, this is what the rungay kuta method is based on, is we need to vectorize.
03:53
So this is a second order differential equation, so you can see.
03:57
So again, only looking at theta, because that's the variable we're solving for, you see that we have a theta double prime term.
04:04
So that's the highest derivative term, so it's going to be second order.
04:08
It also has a theta prime term, but that doesn't matter for calculating the order.
04:12
It's just whatever is highest that's present.
04:14
So we know you can always split up a single second order ordinary differential equation into a system of two ordinary differential equations if we make a substitution of variables.
04:33
And the way we do that is you always start out with, so our variables are going to be x1 of t and x2 of t.
04:44
So x1 of t, we're just going to say equals theta of t.
04:52
Very simple, sort of trivial, theta of t.
04:55
Then we're going to make x2 of t either derivative of theta, so theta prime of t.
05:08
It'll become clear while we did this in a second.
05:11
You can look at this in your textbook.
05:12
This is a common procedure, not even just for the rungaycutta for solving basically any second order differential equation.
05:20
It's called vectorization.
05:22
So we can see pretty much right off the bat that x1 prime, so the first derivative of x1 of t, is going to be theta prime of t, but that's just going to be x2.
05:40
Right? so that's one differential equation in our system.
05:45
Just underline that.
05:46
And then x2 prime of t is a little less straightforward.
05:53
So you see that x2 prime of t is going to be equal to theta double prime of t, which is a little less straightforward.
06:06
We just don't know it right off the bat like we did with x1 of t.
06:10
But if we scroll back up to the top, we can with just basic algebra, solve for theta double prime and in doing so we solve for x2 prime we can plug that in and this will become x2 and the theta term will become x1 and we'll have a completely self -contained linear system of differential equations so to do that and again i'm going to spare you guys the algebra we get this is equal to written out in terms of l negative 2, l prime over l times x2 minus sine of x1 over l.
07:25
So these are going to be our two differential equations that we need to solve.
07:32
Luckily, we don't need to analytically solve them.
07:34
That would be next to impossible, especially with the limited set of methods we've developed so far, but luckily we have computers to do that.
07:42
So you can find a lot of different runga kuta calculators out there on the internet.
07:49
A lot of them, you can find the code for matlab...