Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN MATLAB a . ) Consider the modified problem d 2 y d t 2 + 6 y 2 d y d t + 7

IN MATLAB
a.) Consider the modified problem
d2ydt2+6y2dydt+7y=2sint, with ,y(0)=-1,dydt(0)=0.
The ODE (7) is very similar to (4) except for the y2 term in the left-hand side. Because of the factor y2 the ODE (7) is nonlinear, while (4) is linear. There is however very little to change in the implementation of (4) to solve (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 LABO4ex2.m. The new function M-file should reproduce the pictures in Fig 8.
Include in your report the changes you made to LAB04ex1.m to obtain LABO4ex2.m.
Figure 8: Time series y=y(t) and v=v(t)=y'(t)(left), and phase plot v=y' vs.y for (7).
(b) Compare the output of Figs 7 and 8. Describe the changes in the behavior of the solution in the short term.
(c) Compare the long term behavior of both problems (4) and (7), in particular the amplitude of oscillations.
(d) Modify LABO4ex2.m so that it solves (7) using Euler's method with N=400 in the interval 0t50(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 window (you do not need to plot v(t) nor the phase plot). Are the solutions identical? Comment. What happens if we increase the value of N?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions