%Nonlinear ODE's
%If you modify this file, please indicate here and in the footnote
%Math340
\documentclass[12pt]{article}
\usepackage{times}
\pagestyle{empty}
\addtolength{\textwidth}{1.2in}
\addtolength{\textheight}{1.2in}
\addtolength{\oddsidemargin}{-.58in}
\addtolength{\evensidemargin}{-.58in}
\renewcommand{\baselinestretch}{1.0}
\parindent = 0cm
\parskip = .1cm
\begin{document}
\begin{center}
{\Large
Linear versus Nonlinear
\footnote{Copyright \copyright2002 Larry Snyder and Todd Young.
All rights reserved. Please address comments to young@math.ohiou.edu.}}
\end{center}
\begin{enumerate}
\item\label{linear} Try the following commands
(at the prompt and then press \fbox{Enter}): \vspace{-.2cm}
\begin{enumerate}
\item \verb&syms t y&
\item \verb&dsolve('D2y+y=0', 'y(0)=2', 'Dy(0)=2') &
\item \verb&ezplot(ans, [0, 50])&
\item Change the initial conditions to $y(0) = .2, y'(0) = .2$
\\(Type command b as: \verb$ dsolve('D2y+y=0', 'y(0)=.2', 'Dy(0)=.2')$).
\\How does this affect the solution?
\item Explain exactly what happened.
\end{enumerate}
\vspace{.2cm}
\item Repeat the above procedure to solve the
the following differential equation. Use the initial
conditions: $y(0) = 1, y'(0) = 1$.
$$
y''(t) - y(t) + y^{3}(t) = 0
$$
Why is \textsc{MatLab} unable to solve this equation symbolically?
\item Note that the equation in \#2 may be written as a system
by the substitution \\
$y_1 = y, y_2 = y'$.
This produces the system:
$$
\frac{y_1}{dt} = y_2, \qquad \frac{y_2}{dt} = y_1 - y_1^3 \qquad (1)
$$
Now try the following:
\begin{enumerate}
\item \verb&F=inline('[y(2);y(1)-y(1)^3]', 't', 'y')&
\dotfill Makes \verb&F& the r.h.s.\ of (1).
\item \verb&T = 0:.01:50;& \dotfill Don't skip the semicolon!
\item \verb&[T, Y] = ode45(F, T, [2,2]);&
\item \verb&plot(T, Y(:,1)) &
\end{enumerate}
Try changing the initial conditions to $y(0) = .2, y'(0) = .2$.
How does this effect the solution? How does this differ from the linear case?
\item Use the commands you learned in \#3 to numerically
solve and plot:
$$
y''(t) - y(t) + y^3(t) = \sin(t), \qquad y(0) = 1, \quad y'(0)=1
$$
on the interval $t = [0, 100]$. How does the graph
of this solution differ from all the graphs of
solutions you have seen for linear equations?
\item Prepare a brief (\verb$< $1 page) written report answering
all the questions. Use complete sentences and standard
mathematical notation.
Do {\bf not} get a printout.
\end{enumerate}
\vfill
\textsf{This assignment demonstrates that the solutions
of linear equations are very ``tame" compared with solutions of nonlinear
equations.}
\end{document}