Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

*****IN MATLAB**** solve probelm 2 a) The motion of a given vehicle can be model

ID: 3869144 • Letter: #

Question

*****IN MATLAB**** solve probelm 2

a) The motion of a given vehicle can be modeled by the ordinary differential equation y + 4y + 6y = 0. Analytically convert this ordinary differential equation into an equivalent system of coupled first order ordinary differential equations. b) A particular spring-mass system can be modeled by the coupled ordinary differential equations {m_1 x_1 + k_1 x_1 + k_2 (x_1 - x_2) = 0 m_2 x_2 + k_2 (x_2 - x_1) = 5 sin(t). Analytically convert this coupled ordinary differential equation system into an equivalent system of coupled first order ordinary differential equations. Use ode45 and one other solver of your choice to numerically solve the systems in Problem 1, and plot your states vs. time. Supply your own initial conditions, time steps, and time intervals. Experiment with how the results change based on varying these inputs, and comment on your observations in a statement that prints to the Command Window. In the case of Problem 1(a), since this is a second order ordinary differential equation, you will need to specify two initial conditions: y(0) and y(0). In the case of Problem 1(b), since this is a coupled system of second order ordinary differential equations, you will need to specify four initial conditions: x_1 (0), x_1 (0), x_2 (0), and x_2 (0). Use a value of 10 N/m for k_1, 5 N/m for k_2, 15 kg for m_1, and 12 kg for m_2.

Explanation / Answer

In this section we review the solutions of first order differential equations, separable first order differential equations and linear first order differential equations involving explicit time dependence. The time dependent functions are obtained using the Clock block and a Math Function block. Double-clicking the Math Function block allows for the selection of a number of common functionsSolve the initial value problem

dy /dt = 2 t y, where y(1) = 1.

This is a separable equation. Placing y-variables on the left and t-variables on the right side, we have Z dy y = Z 2 t dt. Integrating both sides, ln |y| = 2 ln |t| + C = ln t 2 + C. Exponentiating, we obtain the general solution, y(t) = At2 , where A = ±e C. Using the initial condition, we have the solution, y(t) = t 2 . We can set up the problem in Simulink as shown in Figure 1.16 for the initial value problem dy dt = 2 t y, where y(1) = 1. Running the simulation, we obtain the solution