Question: Consider the rst order initial value problem: dy dx = y + y ^ 2 ( sin ( x ) cos ( x ) )
Consider the rst order initial value problem:
dy
dx yysinxcosx
y
a Determine the exact solution of the given initial value problem manually Please show
all your working.
b Estimate the value of y using Euler's Method with step size h manually correct
to decimal places. Show all your working.
c Write a MATLAB function Eulerm to solve the initial value problem
dy
dx yysinxcosx
y y
numerically with Euler's method over the general interval x in b for the general initial
condition y y using n regularly spaced points for the x grid. The input variables for
Euler should be b y and n Your code should generate a plot of the solution yxwhile
automatically inserting the label y for the yaxis, the label x for the x axis, and the
title Numerical Solution of Question for your plot.
Next, use your MATLAB function Eulerm to generate and plot the numerical solution
of this initial value problem for the speci ed initial condition y over the interval
x in using n points in your x grid. Make sure to include the plot in your
submission.
d Using appropriate MATLAB commands, overlay a plot of the exact solution found in Part
a onto the plot obtained in Part c The curve for the exact solution should be a dashed
line in your plot.
e State whether the numerical solution found in Part c is an overestimate or underestimate
of the actual solution
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
