Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is a MATLAB assignment for differential equation class. Please help me with the scrips! Much appreciated! :) 2. (a) Consider the modified problem +6y2
This is a MATLAB assignment for differential equation class. Please help me with the scrips! Much appreciated! :)
2. (a) Consider the modified problem +6y2 +4y=2cos t, with y(0)=0, 0)=-1. (L4.7) The ODE (L4.7) is very similar to (L4.4) except for the y ternthe left-hand side. Because of the factor y2 the ODE (14.7) is nonlinear, while (L4.4) is linear. There is however very little to change in the inplementation of (IAA) to solve (L4.7). In fact, the only thing that needs to be modified is the ODE definition Modify the function defining the ODE in LAB04ex1.m. Call the revised file LAB04ex2.m. The THIS CONTENT IS PROTECTED AND MAY NOT BE SHARED, UPLOADED, SOLD OR DISTRIBUTED-C2018 Stefania Tracogna, SoMSS, ASU 8 MATLAB sessions: Laboratory 4 new M-file should reproduce the pictures in Fig LAh Include in your report the M-file LAB04ex2. Figure L4h: Time series y-y(t) and u-u(t)-y,(t) (left), and phase plot u-y' vs. y for (L4.7). (b) Compare the output of Figs L4g and L4h. Describe the changes in the behavior of the solution (c) Compare the long term behavior of both problems (L4.4) and (LA.7), in particular the am (d) Modify LAB04ex2.m so that it solves (L4.7) using Euler's method with N-200 n the in the short term plitude of oscillations. interval 0 st35 (use the file euler.m from LAB 3 to implement Euler's method; do not delete the lines that implement ode45). Let [te,Ye] be the output of euler, and note that Ye is a matrix with two columns from which the Euler's approximation to y(t) must be extracted. Plot the approximation to the solution y(t) computed by ode45 (in black) and the approximation computed by euler (in red) in the same figure (you do not need to plot v(t) nor the phase plot). Include a legend to label each solution. Are the solutions identical? Comment. What happens if we increase the value of N? Include the modified M-file in your report. 2. (a) Consider the modified problem +6y2 +4y=2cos t, with y(0)=0, 0)=-1. (L4.7) The ODE (L4.7) is very similar to (L4.4) except for the y ternthe left-hand side. Because of the factor y2 the ODE (14.7) is nonlinear, while (L4.4) is linear. There is however very little to change in the inplementation of (IAA) to solve (L4.7). In fact, the only thing that needs to be modified is the ODE definition Modify the function defining the ODE in LAB04ex1.m. Call the revised file LAB04ex2.m. The THIS CONTENT IS PROTECTED AND MAY NOT BE SHARED, UPLOADED, SOLD OR DISTRIBUTED-C2018 Stefania Tracogna, SoMSS, ASU 8 MATLAB sessions: Laboratory 4 new M-file should reproduce the pictures in Fig LAh Include in your report the M-file LAB04ex2. Figure L4h: Time series y-y(t) and u-u(t)-y,(t) (left), and phase plot u-y' vs. y for (L4.7). (b) Compare the output of Figs L4g and L4h. Describe the changes in the behavior of the solution (c) Compare the long term behavior of both problems (L4.4) and (LA.7), in particular the am (d) Modify LAB04ex2.m so that it solves (L4.7) using Euler's method with N-200 n the in the short term plitude of oscillations. interval 0 st35 (use the file euler.m from LAB 3 to implement Euler's method; do not delete the lines that implement ode45). Let [te,Ye] be the output of euler, and note that Ye is a matrix with two columns from which the Euler's approximation to y(t) must be extracted. Plot the approximation to the solution y(t) computed by ode45 (in black) and the approximation computed by euler (in red) in the same figure (you do not need to plot v(t) nor the phase plot). Include a legend to label each solution. Are the solutions identical? Comment. What happens if we increase the value of N? Include the modified M-file in your reportStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started