Question

k [2-)(3 т k ( 2)(x3- 2)- 31/2], т k 2 - s)31/2] т k (2-y) (s- )3, т k )(s-2)-31/2, y2 т k [(yy) (y2-y3)- 31/2], т

where and y for i [1, 3 are the position of the three masses (numbered from 1 to 3) in the x and y directions, respectively.

How can I make these equations into 6 first order equations to input them in MATLAB as :

function yp = ivpsys_fun_oscillator(t, y)
% IVPSYS_FUN evaluates the right-hand-side of the ODE's.
% Inputs are current time and current values of y. Outputs are values of y'.
% Call format: yp = ivpsys_fun_oscillator(t, y)
global m k l
%% Define ODE for IVP
% Reduce high order derivative to first order
% y1 -> x1, y2 -> x2, y3 -> x3
% y4 -> z1, y5 -> z2, y6 -> z3
% y7 -> u1, y8 -> u2, y9 -> u3
% y10 -> w1, y11 -> w2, y12 -> w3

yp(1) = y(7);
yp(2) = y(8);
yp(3) = y(9);
yp(4) = y(10);
yp(5) = y(11);
yp(6) = y(12);
yp(7) = (k/m) * ( (y(2)-y(1)) + (y(3)-y(1)) );
yp(8) = (k/m) * ( (y(1)-y(2)) + (y(3)-y(2)) - 3*l/2);
yp(9) = (k/m) * ( (y(1)-y(3)) + (y(2)-y(3)) + 3*l/2);
yp(10) = (k/m) * ( (y(5)-y(4)) + (y(6)-y(4)) + sqrt(3)*l );
yp(11) = (k/m) * ( (y(4)-y(5)) + (y(6)-y(5)) - sqrt(3)*l/2);
yp(12) = (k/m) * ( (y(4)-y(6)) + (y(5)-y(6)) - sqrt(3)*l/2);

end

This is probably wrong but it is as far as I got, thank you

k [2-)(3 т k ( 2)(x3- 2)- 31/2], т k 2 - s)31/2] т k (2-y) (s- )3, т k )(s-2)-31/2, y2 т k [(yy) (y2-y3)- 31/2], т
where and y for i [1, 3 are the position of the three masses (numbered from 1 to 3) in the x and y directions, respectively. At time t 0, the masses are located at the following position (in m): 1, (t = 0) = [1,1 3/2], [ar2, y2](t= 0) = [1/4,1 - 3/4], 3, Ya (t= 0) = [7/4,1 - 3/4], and they have the following initial velocities (in m/s): u1, 1|(t= 0) = [-0.1, 0.1], u2, U2(t 0)(0.2,0.1 (13)] us, v3|(t= 0) [0.2, 0.1 (1 - V3)
0 0
Add a comment Improve this question Transcribed image text
Answer #1


, and a, X;. So, Let - a, and a2 i. e A2 (1) (22-a)(3-a A2 and u t 0) = -0.1 . here fore, Also, a2 (t (t = 0) = u, (t0)=-0., (2) .. b - (0-b,+ (z3-b-2J m u2 (t 0) = 0. 2 , thenfore, X2 (t 0) = 1/ 4 and Since, and b, (t 0 ) = 0.2 bi (t 0) 1 4 So, And,Hence For the second order differntial equations in x , 22, and the system OF First order diffe rential equations are a, 3 а,NOw and y,= q, . Therefoye, ,= q,a=q, and [ (P-,) - q, ) - v31/2] m ai (t 0)=, q, (t =0) = 0.1 1+ V3) 4 And, and 2= y. Ther- 2 (t 0)= 0.1 (1- V3) (t 0) = - /3/4 Hence in terms of a,, a2, b;, b2, ;, c, ,, b2, i,2,and Y,, r,you can input them iyp(5) y (6) [y-y5 yp (6) y3) - yl5)} + 3] And y (8) k [y(9)-y y1)-y(7) 1] yb18) - m pC9) y(10) y)y)y(11) - y (9)} - B ] k yp

Add a comment
Know the answer?
Add Answer to:
How can I make these equations into 6 first order equations to input them in MATLAB...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT