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
  • MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x...

    MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x's, y's, and v's to popup in the command window so I can put in any value and it will find the value for me using the equation I put in. function project_9_sjl() % PROJECT_9_SJL project_9_sjl() is the driver function for the program. % %    Name: Scott Lawrence %   Date: 3/27/2019 %   Class: CMPSC 200 %   Description: Determine the optimal...

  • Please answer using MATHLAB. I need the code and the answer. Thanks, Use MATLAB or Scilab...

    Please answer using MATHLAB. I need the code and the answer. Thanks, Use MATLAB or Scilab to perform the following matrix operations 1) Find the determinant of ſi 7 -2 31 5 -1 9 13 2 51 31 4 6 18 -4 21 2) Find the inverse (A-2) of ſi 7 -2 3] 5 -1 9 13 2 51 314 6 18 -4 2' 3) Given the following set of linear equations X, + 2 x, – x3 + xy...

  • (8 pts) In this problem you will solve the non-homogeneous differential equation y" + 9y =...

    (8 pts) In this problem you will solve the non-homogeneous differential equation y" + 9y = sec (3x) (1) Let C and C2 be arbitrary constants. The general solution to the related homogeneous differential equation y" + 9y = 0 is the function yn (x) = C1 yı(2) + C2 y2(x) = C1 +C2 NOTE: The order in which you enter the answers is important; that is, Cif(x) + C2g(x) + C19(x) + C2 f(x). (2) The particular solution yp(x)...

  • Solve the system of first-order linear differential equations given below. yil ya' = -1 12y2 =...

    Solve the system of first-order linear differential equations given below. yil ya' = -1 12y2 = Y3 Vi = O aY2 = 3 = C+e+ C2 +12 Czte Oby2 yu = Cie C₂e-12 Cze? 13 yi Ce? Cze12 OC. Y2 = 13 Cze' y = 1+Cje od yz = 1+ Cze-12 93 1+Cze y = 1+0,e- Oe. Y2 = Cze12 V3 = Czte

  • Looking for Muller Method MatLab coding for these following equations: This is the code I currently...

    Looking for Muller Method MatLab coding for these following equations: This is the code I currently have but is not working fun = @(x) x.^2-2; x1 = 0; x2 = 1; tol = 0.0001; kmax = 100; function [x, y] = Muller(fun, x1, x2, tol, kmax) x(1) = x1; x(2) = x2; x(3) = (x(2)+x(1))/2; y(1) = feval(fun, x1); y(2) = feval(fun, x2); y(3) = feval(fun, x(3)); c(1) = (y(2)-y(1))/(x(2)-x(1)); for k = 3 : kmax c(k-1) = (y(k)-y(k-1))/(x(k)-x(k-1)); d(k-2)...

  • how this mathematical model relates to the physical hypothesis given in Eq. 2. equation 2 Calculate...

    how this mathematical model relates to the physical hypothesis given in Eq. 2. equation 2 Calculate the spring stiffness, k, from your fit parameter, A. “y = A*sqrt(x).” Mass vs T 1.6 1.4 y = 2.2486x0.41 1.2 1 Period (s) 0.8 0.6 0.4 0.2 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 Mass (kg) т T= 21 k

  • I have all of the answers to this can someone just actually explain this matlab code and the results to me so i can get a better understanding? b) (c) and (d) %% Matlab code %% clc; close all; clear...

    I have all of the answers to this can someone just actually explain this matlab code and the results to me so i can get a better understanding? b) (c) and (d) %% Matlab code %% clc; close all; clear all; format long; f=@(t,y)y*(1-y); y(1)=0.01; %%%% Exact solution [t1 y1]=ode45(f,[0 9],y(1)); figure; plot(t1,y1,'*'); hold on % Eular therom M=[32 64 128]; T=9; fprintf(' M Max error \n' ); for n=1:length(M) k=T/M(n); t=0:k:T; for h=1:length(t)-1 y(h+1)=y(h)+k*f(t(h),y(h)); end plot(t,y); hold on %%%...

  • Matlab-How can i exit the for loop when counts exceeds the max value, then continue to...

    Matlab-How can i exit the for loop when counts exceeds the max value, then continue to the last loop and plot accepted values. counts = 0; for k = 2:length(partDiameter) overlaps = 1; while overlaps == 1 counts = counts + 1; if counts >= 10000 disp('Max particles packed') inCoord = [inCoord;[x,y]]; return; end x = (partDiameter(k)-L)*rand(1,1) + (L-partDiameter(k)/2); y = (partDiameter(k)-L)*rand(1,1) + (L-partDiameter(k)/2); % check if this x,y postion overlaps with previously packed % partices for m = 1:length(inCoord(:,1))...

  • we assume that X solves the differential equation X'=AX. In this problem, we will investigate the strategy to deal...

    we assume that X solves the differential equation X'=AX. In this problem, we will investigate the strategy to deal with repeated eigenvalues. Conside:r A=17-2-6 1. This matrix has only one eigenvalue Ao of multiplicity 3. Find the characteristic equation, the eigenvalue λ0 and an eigenvector P for λ0 2. Find vectors K. L such that (A-X0IK-P and (A-X01)L-K. Compute the matrix M-1AM where M-(PIKL) 3. Let Y -M'X. Solve the equation for Y in the following manner : first, solve...

  • Differential Equations with MATLAB/Plotting first order differential equations in Matlab/ Differential Equations MATLAB/IVP Matlab/IVP I'd really...

    Differential Equations with MATLAB/Plotting first order differential equations in Matlab/ Differential Equations MATLAB/IVP Matlab/IVP I'd really appreciate if I can get some help plotting these 3 first order differential equations as well as their comments. PLEASE! ANYTHING HELPS, I am very stuck :( EZplot and ODE 45 were mentioned in class and the instructions in class were not clear at all. Given the first order differential equation with initial condition. dy/dt = y t, y(0)=-1 Complete problems 1-3 in one...

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