ode45
in Matlab; Euler, improved Euler and Runge-Kutta
methods; controlling the eror in ode45
, reliability of numerical
methods.
close all
sometimes causes Matlab to crash.
Information about time & place, instructor, textbooks, syllabus, grading policy, Matlab assignments, final exam. This was handed out in the first class.
prob.m
, prob.txt
and graphics for
each problem).
fsolve
command. You can use the
fzero
command instead (which was explained in ``Getting started with
Matlab (PS)''). The fsolve
command is more versatile, but is
not included in the student version of Matlab. Note that the first argument of
fsolve
or fzero
can be a string like
'exp(-x)-sin(x)'
, but the variable must be
x
in this case. The first argument can
also be an inline function of one variable.
Problem 2 (B-8 in ``Differential Equations with Maple''): Matlab may not be able to solve all the given differential equations (a)-(f). Either Matlab returns a solution, or it returns ``Explicit solution could not be found''.
Problem 4(b), (c): I recommend to make the contour plot for t in [-3,3] and y in [-3,3] (instead of y in [-2,2] as stated in the problem).
Problem 4(a): Here is an example which shows how to interpret the Matlab output.
Problem 4(b), (c): Problem 5 of Problem Set A (PS)
explains how to make contour plots. Use t
, T
instead
of x
, X
and use in contour
the formula
in T
, Y
resulting from (a) (remember to use
``.*
'' instead of ``*
'').
Problem 4(d): Write the problem in the form g(y)=0 where y is
the unknown function value at t=1. Define an inline function
g(y)
. Then use fzero(g,guess)
.