Computer Project 2
For each question you are required to submit working for all calculations done by hand and a list of commands used for all calculations performed by Matlab.
Assignment
1. Calculate, by hand, the solution to the first-order differential equation
To achieve this, introduce a new variable
such that
and
.
We may now write
,
,
,
.
Euler’s formula for this case reads
,
.
Apply Euler’s formula to find an approximate solution for
,
,
,
over the interval
with
and
plot this solution. Calculate the
exact solution by hand and plot this also on the same graph.