(And it has nothing to do with the fact that my TI-92 can be programming to do L{} & L

^{-1}{})

Magmai Kai Holmlor

- Not For Rent

Started by Aj37, Oct 02 2001 01:30 AM

26 replies to this topic

Posted 10 October 2001 - 07:34 PM

I always *hated* the fact that you had to mystically divine the correct form of the answer to an ODE before you solved it - which is why I use Laplace transforms to solve them all (the only tricky part is factoring the transformation, and if you take some liberties with an arbitrary constant it gets really easy). i.e. You can use Laplace transforms to solve general ODE''s, not just ones with boundary conditions.

(And it has nothing to do with the fact that my TI-92 can be programming to do L{} & L^{-1}{})

Magmai Kai Holmlor

- Not For Rent

(And it has nothing to do with the fact that my TI-92 can be programming to do L{} & L

Magmai Kai Holmlor

- Not For Rent

Posted 11 October 2001 - 03:07 AM

quote:Original post by Omaha

Come on, stop doing the kid''s homework for him. This is basic physics!

The discussions have evolved beyond the homework question now, although I agree with the thought (obviously, ).

Offline, the other moderators and I have been discussing the issue of homework questions posted here, and how to deal with them. There''s no real way we can totally prevent people from cheating, but we can discourage it. And we can encourage other forum members to NOT help a person cheat.

I''ve created a Math & Physics forum FAQ with some guidance on the issue of homework, and you may want to read it. I have a feeling some of this guidance will be posted in a way that all forum members can easily see it in the near future.

Graham Rhodes

Senior Scientist

Applied Research Associates, Inc.

Posted 11 October 2001 - 03:31 AM

quote:Original post by Magmai Kai Holmlor

I always *hated* the fact that you had to mystically divine the correct form of the answer to an ODE before you solved it - which is why I use Laplace transforms to solve them all (the only tricky part is factoring the transformation, and if you take some liberties with an arbitrary constant it gets really easy).

For the problem we''re discussing, the assumed exponential form is directly related to the Laplace transform solution. Our assumed form produces the same algebraic characteristic equation as the Laplace transform.

Of course the Laplace transform is only useful for ODE''s that are LINEAR. And so you wouldn''t really use it to solve "general" ODE''s, . The problem actually might be MORE difficult! The full Newton-Euler equations of motion, for example, are NOT linear for general problems. Even a simple pendulum is not a linear problem (although the standard introductory physics textbook solution for pendulum motion is for a linearized version of the equation of motion....). Try to solve this using the Laplace transform:

J*d

This is basically the nonlinear equation of motion for an undamped simple pendulum with theta being the angle measured counterclockwise from straight down, bob mass of m, length L, and initial position at time 0 of theta(t=0) = 0.

You can do the Laplace transform of d

L(sin(theta)) = integral_0_infinity(sin(theta)*exp(-st)*dt)

Even when you do assume a form----which will intuitively include a harmonic function----you''ll end up integrating something like sin(sin(omega*t)). Have you ever integrated the sine of a sine? If you manage to do this, chances are you''re not going to end up with an algebraic equation in the end, which is really the reason you wanted to use Laplace transform in the first place, . Food for thought.

Graham Rhodes

Senior Scientist

Applied Research Associates, Inc.

Posted 11 October 2001 - 07:45 PM

Ok so it was a rash statement to say I can solve _all ODE's with laplace transforms - but I think I can solve that one.

I'm a little rusty on Laplacain/Holmlorain arbitration, but I'll try to remember:

J*d^{2}theta/dt^{2} = -m*L*sin(theta)

Let y^{' '}(t) = d^{2}theta/dt^{2}

L{y(t)} = Y(s)

L{y^{' '}(t)} = s^{2}*Y(s) - s*y^{'}(0) - y(0)

(since y^{'}(0) and y(0) are unknown, we will give them the distinct arbitrary constant values c_{1} and c_{2})

L{sin(t)} = k^{2} / (s^{2} + k^{2})

However, as you pointed out, the sin is problematic. Not entirely unlike taking a square root, taking the laplacain of a sin requires special attention - in particular, whenever you take the laplacain of a sin (or cos) you add the laplacain of cos (or sin) and multiple it by (yet another) arbitrary constant.

This may be mystical, but at least it's not divine. You do the same thing the same way every time, just like +/- the square root.

So, for our purposes:

L{sin(t)} -> k^{2} / (s^{2} + k^{2}) + c_{3}*s^{2} / (s^{2} + k^{2})

J*y^{' '}(t) + m*L*sin(t) = 0

Take the Laplacain

J*Y*s^{2} + c_{1}s + c_{2} + m*L/ (s^{2} + 1) + c_{3}*s/ (s^{2} + 1) = 0

Now we need to get rid of that ugly s^{2}, so multiple by 1/s^{2}

J*Y + c_{1}/s + c_{2}/s_{2} + m*L/ (s^{2} * (s^{2} + 1)) + c_{3}* / (s * (s^{2} + 1)) = 0

Expand

J*Y + c_{1}/s + c_{2}/s_{2} - m*L/(s^{2} + 1) + m*L/s^{2} - c_{3}*s/(s^{2} + 1) + c_{3}/s = 0

Now, we can elminate the c_{3}/s and m*L/s^{2} terms because they are subsumed into c_{1}/s and c_{2}/s^{2} arbitrary terms

J*Y + c_{1}/s + c_{2}/s_{2} - m*L/(s^{2} + 1) - c_{3}*s/(s^{2} + 1) = 0

Inverse Laplacain

J*y(t) + c_{1}*t + c_{2}*t^{2} - m*L*sin(t) + c_{3}*cos(t) = 0

Given initial conditions you can solve for c_{1}, c_{2}, & c_{3} using some LA.

Now, I know your thinking that that*looks * like a pile more work than other methods - but you can teach a computer this method (like a TI-92 for instance).

Magmai Kai Holmlor

- Not For Rent

[edit]

not much of a chance getting that right the first time

Edited by - Magmai Kai Holmlor on October 12, 2001 2:52:32 AM

I'm a little rusty on Laplacain/Holmlorain arbitration, but I'll try to remember:

J*d

Let y

L{y(t)} = Y(s)

L{y

(since y

L{sin(t)} = k

However, as you pointed out, the sin is problematic. Not entirely unlike taking a square root, taking the laplacain of a sin requires special attention - in particular, whenever you take the laplacain of a sin (or cos) you add the laplacain of cos (or sin) and multiple it by (yet another) arbitrary constant.

This may be mystical, but at least it's not divine. You do the same thing the same way every time, just like +/- the square root.

So, for our purposes:

L{sin(t)} -> k

J*y

Take the Laplacain

J*Y*s

Now we need to get rid of that ugly s

J*Y + c

Expand

J*Y + c

Now, we can elminate the c

J*Y + c

Inverse Laplacain

J*y(t) + c

Given initial conditions you can solve for c

Now, I know your thinking that that

Magmai Kai Holmlor

- Not For Rent

[edit]

not much of a chance getting that right the first time

Edited by - Magmai Kai Holmlor on October 12, 2001 2:52:32 AM

Posted 12 October 2001 - 07:10 AM

I should say first that there was an error in my equation. I neglected to include the gravitational acceleration, g in the right-hand-side. The equation should be:

J*d^{2}theta/dt^{2} = -m*g*L*sin(theta)

If the mass is approximated as a point mass, then J = m*L*L, and the equation can be rewritten:

d^{2}theta/dt^{2} = -(g/L)*sin(theta)

Otherwise, you have to keep J in there explicitly.

Nice try, but there is fundamental flaw in your analysis, not to mention at least two errors. You're taking the Laplacian of sin(t), where t is time. Actually, looks like you meant to take the Laplacian of sin(k*t), not just sin(t). The k in the numerator should not be squared, thus the correct Laplacian of sin(k*t) is:

L{sin(k*t)} = k / (s^{2} + k^{2})

Likewise, the s in the numerator of L{cos(t)} should not be squared. The correct transform is:

L{cos(k*t)} = s / (s^{2} + k^{2})

[reference: "Introduction to Control System Analysis and Design" by Francis J. Hale, Prentice Hall, 1973, Chapter 2].

Probably a careless error, due to "rustiness," . But the erroneous square in the numerators is not the fundamental flaw of your analysis. The fundamental flaw is that you've transformed the wrong equation! You took my equation, shown below with your variable y(t) replacing my theta...

J*d^{2}y(t)/dt^{2} = -m*g*L*sin(y(t))

...and transformed it into the following:

J*d^{2}y(t)/dt^{2} = -m*g*L*sin(t)

Its not the same thing. Your replacement equation**can ** be solved with Laplace transforms (as you well proved---apart from the minor error I pointed out). But you have not solved the actual equation of motion for a nonlinear simple pendulum. Or even a linear pendulum. The harmonic functions for y(t) for a linear pendulum should show a frequency that is a function of g and L, but your solution shows a frequence of exactly 1.0.

Tell me, what is the Laplace transform of sin(y(t))? Well, if you say that y(t) = t then the equation is**your ** equation and it can be solved. But if y(t) = A*sin(constant*t+phi), which is required for the nonlinear pendulum in a simple constant gravity field, the Laplace transform is at least much more difficult, and there may be no closed form equation at all for the transform... There may be a way, but I don't think you'll find the answer in a simple table of Laplace transforms.

Anyway, this is all a bit overkill. For nonlinear problems that are interesting enough to put into games, we'd use numerical methods rather than sweat over trying to find a closed form solution. Still, its good to hone up on those old heavy math skills sometimes, .

Graham Rhodes

Senior Scientist

Applied Research Associates, Inc.

______________________________

These superscripts are driving me crazy!

Edited by - grhodes_at_work on October 12, 2001 2:13:58 PM

Edited by - grhodes_at_work on October 12, 2001 2:14:55 PM

J*d

If the mass is approximated as a point mass, then J = m*L*L, and the equation can be rewritten:

d

Otherwise, you have to keep J in there explicitly.

quote:

Original post by Magmai Kai Holmlor

L{sin(t)} = k^{2}/ (s^{2}+ k^{2})

Nice try, but there is fundamental flaw in your analysis, not to mention at least two errors. You're taking the Laplacian of sin(t), where t is time. Actually, looks like you meant to take the Laplacian of sin(k*t), not just sin(t). The k in the numerator should not be squared, thus the correct Laplacian of sin(k*t) is:

L{sin(k*t)} = k / (s

Likewise, the s in the numerator of L{cos(t)} should not be squared. The correct transform is:

L{cos(k*t)} = s / (s

[reference: "Introduction to Control System Analysis and Design" by Francis J. Hale, Prentice Hall, 1973, Chapter 2].

Probably a careless error, due to "rustiness," . But the erroneous square in the numerators is not the fundamental flaw of your analysis. The fundamental flaw is that you've transformed the wrong equation! You took my equation, shown below with your variable y(t) replacing my theta...

J*d

...and transformed it into the following:

J*d

Its not the same thing. Your replacement equation

Tell me, what is the Laplace transform of sin(y(t))? Well, if you say that y(t) = t then the equation is

Anyway, this is all a bit overkill. For nonlinear problems that are interesting enough to put into games, we'd use numerical methods rather than sweat over trying to find a closed form solution. Still, its good to hone up on those old heavy math skills sometimes, .

Graham Rhodes

Senior Scientist

Applied Research Associates, Inc.

______________________________

These superscripts are driving me crazy!

Edited by - grhodes_at_work on October 12, 2001 2:13:58 PM

Edited by - grhodes_at_work on October 12, 2001 2:14:55 PM

Posted 12 October 2001 - 01:53 PM

And I guess I really meant:

Let y^{' '} = d^{2}theta/dt^{2}

L{sin(k*theta)} = k / (s^{2} + k^{2})

L{sin(k*theta)} -> k / (s^{2} + k^{2}) + c_{3}*s / (s^{2} + k^{2})

Are these valid assumptions to make? or does the laplace transform only work on functions of time?

And the final result would be:

J*y(theta) + c_{1}*theta + c_{2}*theta^{2} - m*g*L*sin(theta) + c_{3}*cos(theta) = 0

I uh, used two different variables named t... all a mote point if I missed something in the original equation.

....

So, are you saying that theta is actually a function, dependant on t?

J*d^{2}theta(t)/dt^{2} = -m*g*L*sin(theta(t)) ?

Absolutely, I feel like I'm leaking.

Magmai Kai Holmlor

- Not For Rent

Edited by - Magmai Kai Holmlor on October 12, 2001 9:17:15 PM

Edited by - Magmai Kai Holmlor on October 12, 2001 9:21:53 PM

Let y

L{sin(k*theta)} = k / (s

L{sin(k*theta)} -> k / (s

Are these valid assumptions to make? or does the laplace transform only work on functions of time?

And the final result would be:

J*y(theta) + c

I uh, used two different variables named t... all a mote point if I missed something in the original equation.

....

So, are you saying that theta is actually a function, dependant on t?

J*d

quote:

Still, its good to hone up on those old heavy math skills sometimes, .

Absolutely, I feel like I'm leaking.

Magmai Kai Holmlor

- Not For Rent

Edited by - Magmai Kai Holmlor on October 12, 2001 9:17:15 PM

Edited by - Magmai Kai Holmlor on October 12, 2001 9:21:53 PM

Posted 15 October 2001 - 06:27 AM

quote:Original post by Magmai Kai Holmlor

And I guess I really meant:

Let y^{'' ''}= d^{2}theta/dt^{2}

L{sin(k*theta)} = k / (s^{2}+ k^{2})

L{sin(k*theta)} -> k / (s^{2}+ k^{2}) + c_{3}*s / (s^{2}+ k^{2})

Are these valid assumptions to make? or does the laplace transform only work on functions of time?

Your first equation, defining y

The Laplace transform transforms a function in the time domain into a function in the frequency domain. Your transforms of L(sin(k*theta)) are incorrect

quote:

And the final result would be:

J*y(theta) + c_{1}*theta + c_{2}*theta^{2}- m*g*L*sin(theta) + c_{3}*cos(theta) = 0

I didn''t look to closely at this, but the "J*y(theta)" part is wrong. Remember, y and theta are the exact same so you would never have a y(theta). You would have a y(t) in the time domain or y(s) in the frequency domain. The transform of J*y

quote:

So, are you saying that theta is actually a function, dependant on t?

Yes! That''s exactly it! theta(t) = y(t). Theta is the solution we''re looking for, and it specifies the motion of the pendulum or object over time. Theta is exactly the same as your variable y.

quote:

Absolutely, I feel like I''m leaking.

Ha!

I say we quit while we''re ahead, .

Graham Rhodes

Senior Scientist

Applied Research Associates, Inc.