Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please show the matlab code! Thanks! Clear, clc, close all, format compact, format shortg %% Problem #1 % 50 points % Consider the following initial

Please show the matlab code! Thanks!

image text in transcribed

Clear, clc, close all, format compact, format shortg %% Problem #1 % 50 points % Consider the following initial value problem over the interval from % t = 0 to 4 where % y(0) = 1 % dy/dt = cos(0.8*y)*t (Not necessarily MATLAB code) % ****************************** *********************** % Notice that this is a function of BOTH t and y! ! % ***************************************************** % a. 10 pts Solve analytically using MATLAB's symbolic algebra capabilities % By solve I mean... create a symbolic expression for y in terms of t %% b. 5 pts Convert your result from part a into an anonymous function % called f %% c. 25 pts Use Euler's method to solve this problem for y, using a step size % of 0.2. Display your results by creating a table showing % the t value, % the corresponding y value determined with Euler's method, % and the analytically determined value of y - which is a function of t % Your table should have a title and appropriate column headings %% d. 10 pts Plot your results - Be use to add a title and axis labels. Your plot % should include two lines - one for the analytical solution and one for % the solution based on Euler's method. Show the calculated points from Euler's method % as circles - Also include a legend

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

More Books

Students also viewed these Databases questions

Question

3. What changes should I be making?

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago