Am I rewriting this differential correctly?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 1K views
thestrangequark
Messages
3
Reaction score
0

Homework Statement


I have a differential equation that I need to solve numerically by writing a program.
x0, y0, x_dot0, y_dot0, α are all given

Hello, I have the following differential equation: http://puu.sh/d78KC/107bd6c71f.png
I want to rewrite it so I can solve it numerically by writing a program. I believe I can replace L2 with m2 * r4 * theta_dot2 making the equation:

r_ddot= r*theta_dot2 * sin2 α -g sinαcosα

And for the problem to solve numerically, I am given the initial x and y position which I can use to solve r initial. I'm also given the initial x and y velocities, which I could solve the tangential velocity with. I then think I can replace theta_dot2 with v_tan2 /r2 making the equation

http://puu.sh/d6pd0/eefb56a511.png

Does this all work out as I've explained, or did I make an error anywhere?

Also, any suggestions on how to write a program to solve this numerically?
 
Last edited by a moderator:
Physics news on Phys.org
Is alpha is a function of t or does the dot indicate a differentiation wrt alpha or something else?
Well, usually ##L=r\dot\theta##, yes.

I think you can solve for r(t) but you need more information to get x(t) and y(t) (or of alpha or whatever).

You need to be explicit about the method you want to use.
I'm guessing you are expected to use some sort of Rung-Kutta?
There are lots of examples of programming this online.
 
alpha is a constant. the dot means it is a differentiation wrt time. I'm trying to get r(t). If possible I would like to get x(t) and y(t) but I'm not sure how.
 
Your description of the problem is a mess, partly because you need to learn how to compose the equations so that we can read them. How confident are you that the starting equation is correct? Is dθ/dt a constant, independent of time? If so, why didn't you say that. If not, then you need another equation. Do you know how to convert from cylindrical coordinates to cartesian coordinates? Are you supposed to be solving the differential equations directly in terms of x and y? Or, are you allowed to solve in terms of the cylindrical coordinates, and then convert to cylindrical coordinates afterwards? You need to specify your problems more precisely for people who are trying to help you.

Chet