Solving first order Ordinary differential equations
Show older comments
u' = v, v' = (1/m1+1/m2)[1/2*y2*∂L/∂u−μ1m1g sgn(v)−k0(u−G)H(u −G) −cv −k1(u−X0)+ (m1+ m1) g], w' = x, x' = 1/m2[1/2*y2*∂L/∂u+ μ1m1g sgn(v)+ k0(u−G)H(u −G) + cv + k1(u−X0) −μ2(m1+ m2)g sgn(x)+(m1+ m1) g] , y' = z, z' = 1/L[Ω Pctr Vs cos(Ωt)−(R +2∂L/∂uv)z−(1/c+ (∂^2 L)/(∂u^2 )v2+ ∂L/∂u v')y]. Only u,v,w,x,y,z and t are variables in this case.
Hi guys, I need to solve these 3 equations above and use u that we find in equation 1 then plot it( the plot will look like a cosine graph).
I have been working on this for weeks, but still no luck. Please help me. thanks a lot. Feel free to contact me for more info.
Answers (1)
Walter Roberson
on 2 Sep 2011
0 votes
There are 6 equations there, it appears to me.
You indicate that only u,v,w,x,y,z and t are variables are variables, but you show u' and v' and so on, which implies that u, v,w, x, y, and z are functions rather than variables.
Is y2 a constant or is it y^2 ?
Is ∂L/∂u the derivative of L with respect to u? If it is then that implies you have at least 7 functions (but only 6 equations)
Is sgn(v) the sign() function applied to v? If it is, then what value is sgn(0) ? Some places define sgn(0) as NaN and some define it as 0 and some define it as 1.
Your definition of x' starts with 1/m2[EXPRESSION] . Are we to take that as (1/m2)*(EXPRESSION), or are we to take that as 1/(m2*(EXPRESSION)) ?
As you have some variables that appear to be constructed of more than one character, we cannot tell whether cv is a single constant or if it is instead c*v .
Is 2∂L/∂uv 2*v*diff(L(t),u(t)) ? Or is it 2*diff(L(t),u(t)*v(t)) ?
Is ∂^2 L intended to be diff(L(t),t,t) ?
Please rewrite your expressions in full operator notation, using * for all multiplications, and converting all characters such as μ and ∂ to characters that are valid in MATLAB expressions, and converting all function calls to their MATLAB equivalents. Use () when necessary, but do not use [] or else we will interpret that portion as being the construction of a vector.
If ∂ is the differential operator, then since u is really u(t), a function rather than a variable, ∂L/∂u would have to be the differential of one function with respect to a second function. In such a case, you would not have ODE: you would have PDE, it seems to me.
1 Comment
Davis Tee
on 2 Sep 2011
Edited: Walter Roberson
on 29 Oct 2018
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!