\documentclass[12pt]{article}
\usepackage{amssymb,amsfonts,dsfont}


%\documentstyle[amsfonts,amssymb,12pt]{article}

\begin{document}


\def\b{\bigskip}
\def\d#1#2{ \frac{d #1}{d #2}}
\def\dn#1#2#3{\frac{d^{#3}{#1}}{d #2^{#3}}}

\thispagestyle{empty}

%\renewcommand{\thepage}{{C \arabic{page}}}
%\def\thepage{{C \arabic{page}}}

%\def\labelpage{R\arabic{page}}
%\def\thepage{ R\arabic{page} }

\centerline{{\sc What are differential equations?}}

\b

A differential equation is an equation involving a derivative (of some sort) of an unknown function.  The goal is to find the function.

\b

\textbf{Examples.}

\begin{enumerate}

\item $\d{y}{x} = x^2+y^2$ is a differential equation.

\item $ \frac{d^2x}{dt^2} + 3\d{x}{t} + 2x = 4$ is a differential equation.

\item  $\frac{\partial^2 f}{\partial x^2}+ \frac{\partial^2 f}{\partial y^2} = 0$ is a differential equation.

\end{enumerate}


The first two examples are {\sc ordinary differential equations}.  They involve functions of one unknown.  The third example is a {\sc partial differential equation}.	In this course, we will be dealing with ordinary differential equations (ODE's).

\b

One question to ask is where differential equations come from.	Here are a few examples.  There are other examples in the text.

\b

\textbf{Examples.}


\begin{enumerate}

\item Suppose that a bank account pays interest on a deposit $P$ in such a way that the rate at which the amount $A = A(t)$ in the account grows is proportional to the amount in the account, where $t$ represents the amount of time after the deposit is made. Then $\d{A}{t} = r A$ for some number $r$.  Note that when $t = 0$, $A = P$, or, equivalently, $A(0) = P$.	 This specification of a particular value of $A(t)$ is called an {\sc initial condition}.	 A differential equation in which an initial condition is satisfied is called an {\sc initial value problem}.	At some point, we will see how to find all functions which satisfy this differential equation, with this initial condition.	(In fact, you have probably done this in an earlier course.)

\item A $100$-gallon tank is empty. A solution of $2\%$ chlorine is added to the tank at the rate of $4$ gallons per hour.  Find a differential equation that represents the amount $y = y(t)$ of chlorine in the tank after $t$ hours, where $0 \leq t \leq 25$.

    \b

Since the solution is added at the rate of $4$ gallons per hour, and $2\%$ of the solution is is chlorine, the chlorine is added at the rate of $(.02)4 = .08$ gallons per hour.  This gives the differential equation $$\d{y}{t} = .08.$$


\item A $100$-gallon tank is full. A solution of $2\%$ chlorine is added to the tank at the rate of $4$ gallons per hour.  Find a differential equation that represents the amount $y = y(t)$ of chlorine in the tank after $t$ hours.  Assume that as soon as the solution is added to the tank, it is mixed completely.

    \b

Note that since the tank is full, any solution that is added to the tank causes the same amount of solution to overflow the tank.  Since the tank holds $100$ gallons, and the amount of chlorine in the tank at time $t$ is $y$, the proportion of the tank that is chlorine is $ \frac{y}{100}$, so the amount of chlorine that overflows is $4\left(\frac{y}{100}\right) = \frac{y}{25}$.	The rate at which the amount of chlorine increases is the rate at which it is added minus the rate at which it overflows.	 Therefore, we get the differential equation $$\d{y}{t} = .08 - \frac{y}{25}.$$







\end{enumerate}



We will see how to solve these (and many other) differential equations later.  However, even without finding a solution, we can find out information about solutions by looking at {\sc direction fields}, or {\sc slope fields} for differential equations of the form .  To see what these are, recall what the derivative is.	If $y = f(t)$, then $\d{y}{t}$ is the slope of the tangent line.  Therefore, if $y = f(t)$ is a function satisfying $\d{y}{t} = h(t,y)$, then at the point $(t,y)$ on the graph of $f$, the slope of the tangent line is $h(t,y)$.  To get an idea of what a solution of the differential equation looks like, at the point $(t,y)$, we draw a line--or actually a line segment--having slope $h(t,y)$.	 Such a collection of line segments is called a {\sc direction field} or {\sc slope field}. Then a solution of the differential equation will be function whose tangent lines are among the lines that have been drawn.

\b


\pagebreak



We can draw solutions to the ODE by drawing curves with the property that at each point of the curve, the tangent line contains one of the segments in the direction field.	 Such a curve is called an {\sc integral curve}.  The integral curves will be the graphs of solutions of the ODE.


\b

\textbf{Examples.}

\begin{enumerate}


\item Draw a direction field for the differential equation $\d{y}{t} = 2$ and draw some integral curves.



\begin{picture}(170,170)
\put(45,75){\vector(1,0){120}}
\put(100,20){\vector(0,1){100}}
\multiput(5,20)(0,20){6}{\multiput(35,0)(10,0){15}{\line(1,2){5}}}
\end{picture}	




Note that a solution will be a line of slope $2$, but there are infinitely many choices for such a line.  However, if we specify that we want a solution such that when $t = 3$, $y = 1$, that is, if we specify the initial condition $y(3) = 1$, then there is only one solution.	



\item Draw a direction field for the differential equation $\d{y}{t} = .08 - \frac{y}{25}$, and draw some integral curves.

Note first that all segments corresponding to a given $y$-value have the same slope.	 In particular, if $y = 2$, the slope will be $0$.	

\begin{picture}(170,170)
\put(45,75){\vector(1,0){120}}
\put(100,20){\vector(0,1){100}}
\multiput(45,85)(10,0){12}{\line(1,0){5}}
\end{picture}


Similarly, if $y = 0$, the slope is $.08$. If $y = 4$, the slope is $-.08$, and we can try various values.

\begin{picture}(170,170)
\put(45,75){\vector(1,0){120}}
\put(100,20){\vector(0,1){100}}
\multiput(45,85)(10,0){12}{\line(1,0){7}}
\multiput(45,74)(10,0){12}{\line(5,1){11}}
\multiput(45,64)(10,0){12}{\line(4,1){11}}
\multiput(45,94)(10,0){12}{\line(5,-1){11}}
\multiput(45,104)(10,0){12}{\line(4,-1){11}}
\end{picture}


In this picture, note that one solution is the constant function $y = 2$. This arises from the initial condition $y(0) = 2$.	If we go back to the original problem, this says that if initially the amount of chlorine in the tank was $2$ gallons, then the amount in the tank will always be $2$ gallons.  We say that $y = 2$ is an {\sc equilibrium solution} of the ODE. Notice that at the value $y = 2$, the derivative $\d{y}{t}$ is $0$.


\b

Notice that in this case, no matter which integral curve we draw, as $t$ gets large, $y$ approaches $2$. This means that no matter what the initial condition is, the solution of the differential equation will approach $2$. In physical terms, this says that no matter how much chlorine is in the tank initially, eventually the amount in the tank will get close to $2$ gallons.

\b

As in this example, to draw the direction field for the differential equation $\d{y}{x} = h(x,y)$, it is often helpful to find where the slope of the tangent vector is constant, that is, where $h(x,y) = k$ for various values of $k$.



\end{enumerate}

\b

\textbf{Example.} Draw the direction field for the differential equation $\d{y}{x} = y - x$.

\b

{\tt Note to self:	The general solution is $y = x + 1 + Ce^x$.}

\b

Note that if $k$ is a constant, the graph of $y - x = k$ is the line with slope $1$ and $y$-intercept $k$.	Therefore, the slope of the tangent line will be $k$ on this line.  For example, the slope will be $0$ on the line $y = x$, the slope will be $1$ on the line $y = x + 1$, and so on.	

\begin{picture}(170,170)
\put(45,75){\vector(1,0){120}}
\put(100,20){\vector(0,1){100}}
\multiput(45,25)(10,10){12}{\line(1,0){7}}
\multiput(45,35)(15,15){9}{\line(1,1){10}}
\multiput(45,45)(15,15){9}{\line(1,2){7}}
\multiput(45,15)(15,15){10}{\line(1,-1){10}}
\end{picture}

\b


MAPLE can draw direction fields, although it is sometimes a little picky.

\b

with(DEtools);\\
dfieldplot(diff(y(x),x)=y(x) - x,y(x),x=-3..3,y=-3..3,arrows=line);


\b

\{ Page 7 \hspace{1in} 1, 3, 4, 15-18, 21

\b



\pagebreak

\centerline{{\sc Solutions of some ODEs}}

\b

A differential equation of the form $\d{y}{x} = h(y)$ is said to be \textit{autonomous}. In other words, an autonomous differential equation is one in which the independent variable does not appear explicitly (except in the derivative).

\b

\textbf{Examples.}

\begin{enumerate}

\item $\d{y}{x} = \sqrt[3]{y}$ and $\d{x}{t} = x^2 - x$ are autonomous ODEs.

\item  $\d{y}{x} = \sqrt[3]{x}$ and $\d{x}{t} = x^2 - t$ are not autonomous ODEs.


\end{enumerate}


We can in principle find solutions of autonomous ODEs using the Rule of Substitution.  Recall that the rule of substitution says, roughly, that $$\int f(y(x)) \d{y}{x} dx = \int f(y) dy.$$  We can also find solutions of initial value problesm.

\b

\textbf{Examples.}

\begin{enumerate}

\item Find solutions of the ODE $\d{y}{x} = \frac{1}{y}$.

\b

Multiplying by $y$ gives $y\d{y}{x} = 1$.  We integrate both sides with respect to $x$ to get $\int y\d{y}{x} dx = \int 1 dx$, so $\frac{y^2}{2} = x + K$, where $K$ is a constant.  (It is important to include the constant, although we do not need a constant on both sides of the equation.)	 Therefore, $y^2 = 2x + C$, where $C = 2K$ is an arbitrary constant, so $$y = \pm \sqrt{2x + C}.$$	We can check that any function of this form satisfies the given ODE.

\item Find solutions of the ODE $\d{A}{t} = (.05)A$.  Note that this is a differential equation that arose in the discussion of continuously compounded interest.

\b

Dividing both sides by $A$ gives $$\left( \frac{1}{A} \right) \d{A}{t} = .05.$$	Integrating both sides with respect to $t$ gives $$ \int \left( \frac{1}{A} \right) \d{A}{t} dt = \int .05 dt,$$ or $$\int \left( \frac{1}{A} \right) dA = (.05)t + K,$$ where $K$ is a constant.	 Therefore, $$\ln |A| = (.05)t + K,$$, or $$A = \pm e^{(.05)t + K} = Ce^{(.05)t},$$ where $C$ is the (non-zero) constant $\pm e^K$.	 Therefore, any function of the form $A(t) = Ce^{(.05)t}$, where $C$ is a non-zero constant is a solution.  However, notice that this does not give all solutions.  The function $A(t) = 0$ is also a solution.	 This means that $A(t) = Ce^{(.05)t}$ is a solution for any constant value of $C$ (including $C = 0$).

\item Find a solution of the initial value problem $\d{A}{t} = (.05)A$, $A(0) = 200$.

    \b

From the previous problem, we look for a solution of the form $A(t) = Ce^{(.05)t}$.  Since $200 = A(0) = Ce^{(.05)0} = C$, we get $C = 200$, so a solution is $A(t) = 200e^{(.05)t}$.	 We can check that this solution satisfies both the ODE and the initial condition.

\item \textit{Newton's Law of Cooling} says that if the ambient temperature is a constant, say $A$, then an object cools at a rate proportional to the difference between the temperature of the object and the ambient temperature.  In symbols, if $Y(t)$ represents the temperature of the object, then $\d{Y}{t} = -k(Y - A)$ for some constant $k$.	(The minus sign is put there as a convenience.)  Suppose that a body is discovered at $2$ pm.	The ambient temperature is $70^\circ$ and the body temperature at the time of discovery is $85^\circ$, and the body temperature at $3$ pm is $80^\circ$.  Estimate the time of death, assuming that the temperature of the person while alive was $98^\circ$.

\b

By Newton's Law of Cooling, if $Y(t)$ is the body temperature $t$ hours after $2$ pm, then $$\d{Y}{t} = -k(Y - 70)$$.  We also know that $Y(0) = 85$ and $Y(1) = 80$. We first find a solution of the initial value problem, and to do that, we find a solution of the ODE.	Rewriting the ODE gives $$\left( \frac{1}{Y - 70} \right) \d{Y}{t} = -k,$$ and integrating (using the Rule of Substitution) gives $$\int \left( \frac{1}{Y - 70} \right) dY = \int -k dt,$$ so $$\ln|y - 70| = -kt + K,$$ or $$Y - 70 = \pm e^Ke^{-kt}.$$	 Letting $C = \pm e^k$ we get $$Y = Ce^{-kt} + 70$$ where $C$ is a non-zero constant.  Again, we note that $Y = 70$ is also a solution of the ODE, so letting the constant $C$ be $0$ also gives a solution.

Our next task is to find the value of the constants $C$ and $k$.  Since $Y(0) = 85$ and $Y(1) = 80$, we get the equations

\begin{eqnarray*}
C + 70 & = & 85 \\
Ce^{-k} + 70 & = & 80
\end{eqnarray*}


From the first equation, we get $C = 15$.  Substituting in the second equation gives $15e^{-k} = 10$, and solving gives $-k = \ln ( \frac{2}{3})$, or $k = \ln( \frac{3}{2})$.	Therefore, $$Y = 15e^{(\ln{2}{3})t} + 70 = 15 \left( \frac{2}{3}\right)^t + 70.$$  We want the value of $t$ for which $Y(t) = 98$.	 Therefore, we solve $$15 \left( \frac{2}{3}\right)^t + 70 = 98.$$  We get $\left( \frac{2}{3}\right)^t = \frac{28}{15}$, so $t = (\ln \frac{6}{5})/ (\ln \frac{2}{3}) \approx -1.5$.	 Therefore, the person died approximately $1.5$ hours before $2$ pm, or $12:30$ pm.


\end{enumerate}

\b


\{ Page 15 \hspace{1in} 1, 3, 7(a), 13, 18(a,b)

\pagebreak

\centerline{{\sc Classifying ODEs}}

\b

We have mentioned the difference between ordinary differential equations and partial differential equations: Ordinary differential equations (ODEs)are those in which the unknown function is a function of a single unknown, such as $$ \frac{d^2y}{dx^2} + xy^2\d{y}{x} + xy = \left(\d{y}{x} \right)^2.$$

\noindent Partial differential equations are those in which the unknown function is a function of two or more unknowns, such as \textit{Laplace's equation}:

$$ \frac{\partial^2 z}{\partial x^2} + \frac{\partial^2 z}{\partial y^2} = 0,$$ where here $z$ is a function of $x$ and $y$.

In this course, we will be dealing with ODEs, although even in this context we will sometimes use partial derivatives.

\b

Later we will be looking at not only a single ODE but a \textit{system of ODEs}, in which we have several functions of a single unknown and they satisfy a number of differential equations.	 An example of such a system is
$$
\left\{
\begin{array}{ccc}
\d{x}{t} + 3\d{y}{t} & = &	0.\\
\d{x}{t} + \d{y}{t}	 & = &	4.\\
\end{array}
\right.
$$


\b

The \textit{order} of an ODE is the largest $n$ for which there is an $n^{th}$ derivative. Sometimes the $n^{th}$ derivative of a function $y = f(x)$ is written as $y^{(n)}$.  In this context, the $0^{th}$ derivative of $y$ is $y$ itself.

\b

\textbf{Examples.}

\begin{enumerate}

\item $\dn{y}{x}{2} + (\cos x)\d{t}{x} + e^x y = x \sin t$ is a second-order ODE.

\item $\dn{x}{t}{3} + t^5x^4(\d{x}{t})^7 + 3x = t^2$ is a third-order ODE.

\item $ y^{(4)} + \sin (y^{(4)}) = y^2 + x^2 $ is a fourth-order ODE.

\end{enumerate}

In this course we will consider only ODEs in which the highest order is (or can be) expressed as a function of the other derivatives, that is, we will consider $n^{th}$ order ODEs in which $\dn{y}{x}{n}$ can be written as a function of $\dn{y}{x}{n-1},\dn{y}{x}{n-2}, \cdots \d{y}{x},y$ and $x$, say $\dn{y}{x}{n} = F(\dn{y}{x}{n-1},\dn{y}{x}{n-2}, \cdots \d{y}{x},y,x)$.	 For example, in the first example above we cam write $$\dn{y}{x}{2} = -(\cos x)\d{t}{x} - e^x y + x.$$   In the third example, however, we cannot write $y^{(4)}$ in terms of lower-order derivatives and $x$.

\b

An ODE is \textit{linear} if it can be written in the form $$ \sum_{k=0}^n\alpha_k(x)y^{(k)} = g(x),$$ or $$\alpha_n(x)\dn{y}{x}{n} + \cdots + \alpha_1(x)\d{y}{x} + \alpha_0(x) y = g(x).$$	 (The word ``linear'' is used because if we consider the function $F(y) = \sum_{k=0}^n\alpha_k(x)y^{(k)}$ which we get from the left side, then $$F(Cy_0 + y_1)= CF(y_0)+ F(y_1)$$ for all choices of the $y_0$s and $y_1$ and constants $C$.) A linear ODE is \textit{homogeneous} if the function $g(x)$ is $0$.

If an ODE is not linear, it is \textit{nonlinear}.

\b

\textbf{Examples.}


\begin{enumerate}


\item $\dn{y}{x}{3} + x^2\dn{y}{x}{2} + \sin x \d{y}{x} + x^2y = 0$ is linear and homogeneous.

\item $\dn{y}{x}{3} + x^2\dn{y}{x}{2} + \sin x \d{y}{x} + x^2y = \cos x$ is linear but not homogeneous.



\item $\dn{y}{x}{3} + y^2\dn{y}{x}{2} + \sin x \d{y}{x} + x^2y = \cos x$ is nonlinear.

\item The equation $\dn{\theta}{t}{2} + K \sin \theta = 0$, where $K$ is a constant arises in the study of the motion of a pendulum. ($K$ is  the ratio of the gravitational constant $g$ to the length of a pendulum.) This is a second-order nonlinear ODE.  The reason for the nonlinearity is that in a linear equation we are not allowed to have the term $\sin \theta$ where $\theta$ is the dependent variable.


\end{enumerate}


A \textit{solution} of an ODE $\dn{y}{x}{n} = F(\dn{y}{x}{n-1},\dn{y}{x}{n-2}, \cdots \d{y}{x},y,x)$ on an interval $(a,b)$ is a function $y = \phi(x)$ such that $\dn{\phi(x)}{x}{n} = F(\dn{\phi(x)}{x}{n-1},\dn{\phi(x)}{x}{n-2}, \cdots \d{\phi(x)}{x},\phi(x),x)$ for all $x$ in the interval $(a,b)$.	


\b

\textbf{Example.}  The function $y = \frac{e^x}{x}$ is a solution of the ODE $\d{y}{x} + \left( \frac{1-x}{x} \right) y = 0$ on the interval $(0, \infty)$. That is not the only solution: $y = \frac{2e^x}{x}$ and $y = \frac{3e^x}{x}$ and any function of the form $y = \frac{Ce^x}{x}$, $C$ a constant, is a solution.



\b

Among the questions we ask about the ODE $\dn{y}{x}{n} = F(\dn{y}{x}{n-1},\dn{y}{x}{n-2}, \cdots \d{y}{x},y,x)$ are:

\begin{itemize}

\item Does the ODE have a solution?

\item If the ODE has a solution, does it have a unique solution that satisfies a given initial condition?

\item If the ODE does have a solution, can we find it?

\item If we cannot find a solution of the ODE, can we at least find an approximation to the solution?

\end{itemize}

\b


\{ Page 24 \hspace{1in} 1-6, 8-11, 15, 16

\pagebreak

\centerline{{\sc First-order linear ODEs}}

\b

A first-order linear ODE can be written in the form $$\d{y}{t} + p(t)y = q(t),$$ where $p(t)$ and $q(t)$ are functions.	In order to solve this differential equation, we note that if we have an equation of the form $$\d{f}{t} = g(t),$$, then we can integrate both sides of the equation with respect to $t$ and get that $$f(t) = \int g(t) dt.$$  The idea is to get the given ODE to have this form.


\b

Recall that the Product Rule says the $\d{uv}{t} = v\d{u}{t} + u\d{v}{t}$, so that the derivative of the product of two functions is the sum of two functions.	 The left side of the ODE we are trying to solve is a sum of two functions, so we try to write the given ODE as the derivative of a product.	 However, it might not be the derivative of a product.  The idea is to multiply both sides of the equation by a function $\mu(t)$ so that after the multiplication, the left side is a derivative.	The function $\mu(t)$ is called an \textit{integrating factor}.	


\b

We are looking for $\mu(t)$ so that $\mu  \d{y}{t} + \mu p(t)y $ is $\d{uv}{t}$ for some functions $u$ and $v$.	 We try to find a function $\mu = \mu(t)$ so that $$\d{\mu y}{t} = \mu	\d{y}{t} + \mu p(t)y.$$	 From the Product Rule, we get $$\mu \d{y}{t} + y \d{\mu}{t} = \mu	 \d{y}{t} + \mu p(t)y.$$  Therefore, we should take $\mu$ so that $$\left( \frac{1}{\mu} \right) \d{\mu}{t} = p(t),$$ or $\ln \mu = \int p(t) dt$ (ignoring the absolute value--it turns out this is okay in this case).	 We can write this as $$\mu = e^{\int p(t) dt}.$$  This works.

\b

To summarize, to solve $$\d{y}{t} + p(t)y = q(t),$$ where $p(t)$ and $q(t)$ are functions, multiply both sides of the equation by the integrating factor $$e^{\int p(t) dt}.$$  The new equation is then $$\d{ye^{\int p(t) dt}}{t} = q(t)e^{\int p(t) dt}.$$	 We can now integrate both sides of the equation with respect to $t$ to get $$ye^{\int p(t) dt} = \int q(t)e^{\int p(t) dt} dt,$$ so $$y = e^{-\int p(t) dt} \int q(t)e^{\int p(t) dt} dt.$$


\b


The solution we find by this method is called the \textit{general solution} of the ODE.  It will involve an arbitrary constant $C$.  When we replace $C$ by a number, we get a \textit{particular solution}.


\b

\textbf{Examples.}


\begin{enumerate}



\item Solve the ODE $\d{y}{t} -	 y = 3$.

\b

\underline{Method 1} We can rewrite the equation as $\left( \frac{1}{y+3} \right) \d{y}{t} = 1$ and integrate both sides with respect to $t$ to get $\ln (y + 3) = t + k$, so $y + 3 = e^{t	 + k} = Ce^t$.	Therefore, $$y = Ce^t - 3.$$

\b

\underline{Method 2}  (Using integrating factors.)	In this case, the function $p(t)$ is the constant $-1$, so $$\mu(t) = \int e^{-t} dt = -e^{-t}.$$	 Multiplying both sides of the ODE by $\mu$ gives $$\d{-ye^{-t}}{t} = 3 (-e^{-t}),$$ so $$-ye^{-t} = \int -3e^{-t} dt = 3e^{-t} + k.$$ Multiplying by $-e^t$ gives $$y = -3 -ke^t = Ce^t  - 3.$$


\b

We could summarize Method 2 by just using the formula $$y = e^{-\int p(t) dt} \int q(t)e^{\int p(t) dt} dt.$$	 We then get $y = e^{-\int (-1)dt}\int 3e^{\int (-1)dt} dt = e^t \int 3e^{-t} dt = e^t (-3e^{-t} + C) = Ce^t - 3$.

\b

In	this case, Method 1 is much easier.	 However, Method 1 can not always be used.

\item Solve $\d{y}{x} + 2y = e^{4x}$.

\b

If we try to do what we did in Method 1 in the last example, we get $\left( \frac{1}{e^{4x} - 2y} \right) \d{y}{x} = 1$ and we have no way of integrating the left side, because it involves $x$ as well as $y$.	

\b

Here the integrating factor is $\mu(x) = e^{\int 2 dx} = e^{2x}$.  Multiplying the ODE by $\mu$ gives $$e^{2x} \d{y}{x} + 2ye^{2x} = e^{2x}e^{4x},$$ or $$d{ye^{2x}}{x} = e^{6x}.$$ Therefore, $$ye^{2x} = \int e^{6x}dx = ( \frac{1}{6})e^{6x} + C,$$ or $$y = \frac{e^{4x}}{6} + Ce^{-2x}.$$


\item Solve the initial value problem $\d{x}{t} + 2tx = t$, $x(0) = 3$.

\b

We first solve the ODE.	 We use the integrating factor $\mu(t) = e^{\int 2t dt} = e^{t^2}$.	 Then the ODE becomes $$e^{t^2} \d{x}{t} + 2te^{t^2}x = te^{t^2},$$ or $$\d{xe^{t^2}}{t}  = te^{t^2}.$$	 Integrating gives $$xe^{t^2} = \int te^{t^2} dt = ( \frac{1}{2})e^{t^2} + C.$$  Therefore, $$x = ( \frac{1}{2}) + Ce^{-t^2}.$$

\b

Now we use the initial condition to find $C$.  $x(0) = ( \frac{1}{2}) + Ce^{-0^2} = ( \frac{1}{2}) + C$, and since $x(0) = 3$, we get $(\frac{1}{2}) + C = 3$, so $C = \frac{5}{2}$.	Therefore, the solution of the initial value problem is $$x = ( \frac{1}{2}) + (\frac{5}{2})e^{-t^2}.$$


\item Solve the initial value problem $x\d{y}{x} + 2x^2y = e^{-x^2}$, $y(1) = 2$.

\b

We first solve the ODE, and to do that, we need to write the ODE in the standard form: $$\d{y}{x} + 2xy = \frac{e^{-x^2}}{x}.$$	  The integrating factor is $\mu(x) = e^{\int 2x dx} = e^{x^2}$.	We get $\d{e^{x^2}y}{x} = \frac{1}{x}$, and integrating gives $e^{x^2}y = \ln |x| + C$, or $$y = e^{-x^2}\ln |x| + Ce^{-x^2}.$$	Now we find the constant $C$.  $y(1) = e \ln 1 + Ce^{-1} = Ce^{-1}$ and $y(1) = 2$, so $Ce^{-1} = 2$.  Therefore, $C = 2e$, so $$y = e^{-x^2}\ln |x| + (2e)e^{-x^2} = e^{-x^2}\ln |x| + 2e^{1-x^2}.$$





\end{enumerate}


\b


\{ Page 39 \hspace{1in} 1, 3, 13-16, 20

\pagebreak

\centerline{{\sc Separable ODEs}}



\b


A first order ODE is \textit{separable} if it can be written in the form $\d{y}{x} = g(x)h(y)$.	Note that an autonomous differential equation $\d{y}{x} = h(y)$ is separable, because in that case we can let $g(x) = 1$ for all $x$.

\b

\textbf{Examples.}

\begin{enumerate}

\item The ODE $\d{y}{x} = x^2 \cos y$ is separable.

\item The ODE $\d{y}{x} =  \cos (x^2y)$ is not separable.


\end{enumerate}


\b

A separable ODE can be written in the form $M(x) + N(y) \d{y}{x} = 0$.

\b

\textbf{Example.} The separable ODE $\d{y}{x} = x^2 \cos y$	 can be written as $x^2 + (- \frac{1}{\cos y}) \d{y}{x} = 0$, or $x^2 + (- \sec y) \d{y}{x}= 0$.



\b

If we multiply by the differential $dx$, and recall that the differential $dy$ is $\d{y}{x} dx$, this equation can be written as $$M(x)dx + N(y)dy = 0.$$	

\b

\textbf{Example.} The ODE $\d{y}{x} = x^2 \cos y$ can be written as $$x^2dx + (- \sec y) dy= 0.$$

\b

More generally, any ODE of the form $\d{y}{x} = f(x,y)$ can be written as
$$M(x,y)dx + N(x,y)dy = 0.$$ (Recall that an expression of the form $M(x,y)dx + N(x,y)dy = 0$ is called a \textit{differential form}.)

\b

\textbf{Example.} The (non-separable) ODE $\d{y}{x} =  \cos (x^2y)$ can be written as $$\cos (x^2y) dx + (-1) dy = 0.$$ It can also be written as $$(1)dx + (- \sec (x^2y)) dy = 0.$$	 There are many other ways as well.

\b

Writing ODEs in this form will be useful later, but for now we can use this way of writing separable ODEs to solve them (in principle).	 The idea is that we write $M(x)dx + N(y)dy = 0$ as $N(y)dy = - M(x)dx$. Since $dy = \d{y}{x} dx$, the Rule of Substitution (or the Chain Rule) tells us that $\int N(y)dy = - \int M(x)dx$.  If we can evaluate both integrals, sometimes, but not always, we can solve for $y$ in terms of $x$; if we cannot, we only get an implicitly defined function.

\b

\textbf{Examples.}

\begin{enumerate}


\item Solve the ODE $\d{y}{x} = 2xy$.

\b

We can write this as $\frac{1}{y} \d{y}{x} = 2x$, or, using differentials, as $\left( \frac{1}{y} \right) dy = 2x dx$.	 Integrating gives $\int\left( \frac{1}{y} \right) dy = \int 2x dx$, or $\ln|y| = x^2 + K$.  Therefore, $y = \pm e^K e^{x^2}$, or $y = Ce^{x^2}$, where $C$ is a nonzero constant.	 Again, we can notice that letting $C = 0$ again gives a solution of the original ODE.

We can check that any function of the form $y = Ce^{x^2}$ is a solution of the original ODE.


\item Solve the initial value problem $\d{y}{x} = \frac{3x^2 + 2x}{4y^3 +3y^2 + 1}$, $y(2) = 1$.


\b

We write the ODE as $(4y^3 +3y^2 + 1)dy = (3x^2 + 2x) dx$.	Integrating gives $$y^4 + y^3 + y = x^3 + x^2 + C.$$  We need to find $C$.	Since $y(2) = 1$, we replace $x$ by $2$ and $y$ by $1$ to get $3 = 12 + C$, so $C = -9$.  Therefore, $$y^4 + y^3 + y = x^3 + x^2 - 9.$$	 It would be difficult to find $y$ explicitly, although not impossible.  We will just leave the solution in this form.	

To check the answer, we can use implicit differentiation.  An easier way is to use the fact from third-semester calculus that if $y = f(x)$ is a function satisfying the equation $F(x,y) = 0$, then $\d{y}{x} = - \left( \frac{F_x(x,y)}{F_y(x,y)} \right)$.	 In this case, $y$ is a function of $x$ satisfying $F(x,y) = 0$, where $F(x,y) = y^4 + y^3 + y - x^3 - x^2 + 9.$  $F_x(x,y) = -3x^2 - 2x$, and $F_y(x,y) = 4y^3 + 3y^2 + 1$, so $\d{y}{x} = \frac{3x^2 + 2x}{4y^3 + 3y^2 + 1}$, which is what it is supposed to satisfy.

\item Solve the initial value problem $\d{y}{x} = x^2 \cos y$, $y(9) = 0$.	

\b

This can be written as $(\sec y)dy = x^2 dx$.  Integrating both sides gives:

    \begin{eqnarray*}
    \int(\sec y)dy & = & \int x^2 dx \\
    \ln|\sec y + \tan y | & = & \left( \frac{x^3}{3} \right) + C\\
    \end{eqnarray*}

To find $C$, we use the initial condition: when $x = 9$, $y = 0$.  Replacing $x$ by $9$ and $y$ by $0$ gives $\ln 1 = 9 + C$, so $C = -9$.	 Therefore, a solution $y$ satisfies	 $\ln |\sec y + \tan y |  =	 \left( \frac{x^3}{3} \right) - 9$.

It is a good exercise to write $y$ in terms of $x$, but in general, we will just leave a solution in this form, where $y$ is defined implicitly, if there is a lot of work involved.  Notice, though, that we can draw the direction field, and from that get an idea of what solutions look like.	







\item Solve the initial value problem $\d{x}{t} = tx^2 \ln t$, $x(1) = 2$.

\b

The ODE can be written as $\left( \frac{1}{x^2} \right) dx = t \ln t dt$.  Integrating both sides gives $-\left( \frac{1}{x} \right) = \left( \frac{t^2}{2} \right) \ln t - \frac{t^2}{4} + C$. Since $x(1) = 2$, we get $- \frac{1}{2} = -\frac{1}{4} + C$, so $C = -\frac{1}{4}$.	Therefore, $-\left( \frac{1}{x} \right) = \left( \frac{t^2}{2} \right) \ln t - \frac{t^2}{4}-\frac{1}{4}$, which can be written as $$x = \frac{4}{t^2 + 1 -2t^2 \ln t}.$$



\end{enumerate}


\b


\{ Page 47 \hspace{1in} 1-4, 7, 9-11, 29

\pagebreak

\centerline{{\sc Existence and uniqueness of solutions}}



\b



An initial value problem need not have a unique solution, that is, it is possible to have an ODE $\d{y}{x} = h(x,y)$ with an initial condition $y(a) = b$ such that there is more than one function satisfying both the ODE and the initial condition.

\b

\textbf{Example.} Consider the initial value problem $\d{y}{x} = \sqrt[3]{y}$ subject to the initial condition $y(2) = 0$.

\b

This is an autonomous ODE.	We (naively) write it as $y^{- \frac{1}{3}} \d{y}{x} = 1$ and integrate to get $\left( \frac{3}{2} \right) y^{ \frac{2}{3}} = x + C$, so $$y = \pm \left( \frac{2}{3} (x + C)\right)^{\frac{3}{2}}.$$  Now we use the initial condition to find $C$. For either $\left( \frac{2}{3} (x + C)\right)^{\frac{3}{2}}$ or $-\left( \frac{2}{3} (x + C)\right)^{\frac{3}{2}}$, 	 since $y(2) = 0$ and $y(2) = \pm \left( \frac{2}{3} (2 + C)\right)^{\frac{3}{2}}$, we know $\left( \frac{2}{3} (2 + C)\right)^{\frac{3}{2}} = 0$, and solving this gives $C = -2$.	Therefore, we get the solution $y = \pm \left( \frac{2}{3} (x -2)\right)^{\frac{3}{2}}$, and this is a solution for $x \geq 2$.	However, solution is not defined for any $x < 2$.	 Note that the function $y = 0$ also satisfies the ODE, but it is not of the form $y =\left( \frac{2}{3} (x + C)\right)^{\frac{3}{2}}.$	Of course, the function $y = 0$ does satisfy the initial condition and is defined for $x < 2$, so this gives a solution which is defined in an open interval containing $x = 2$.  However, this is not the only solution; we can let $y$ be given by $y(x) = \cases{0 & If $x < 2$, \cr \left( \frac{2}{3} (x -2)\right)^{\frac{3}{2}} & If $x \geq 2$, \cr}$, or let $y$ be given by $y(x) = \cases{0 & If $x < 2$, \cr -\left( \frac{2}{3} (x -2)\right)^{\frac{3}{2}} & If $x \geq 2$, \cr}$ and then $y$ is a differentiable function satisfying the initial condition and the ODE.	 (We have to check that it is differentiable.)  So we have found $3$ solutions which differ on every neighborhood of $x = 2$.

\b

We want to find conditions which will assure that an initial value problem has a unique solution.	It turns out that the problem with the last example is that the function $\sqrt[3]{y}$ on the right side of the equation does not have a partial derivative with respect to $y$ at $0$.

\b

\textbf{Theorem.} Suppose that the function $f(x,y)$ is continuous and that $\frac{\partial f}{\partial y}$ is continuous on an open set containing the point $(x_0,y_0)$. Then there is an open interval $(a,b)$ containing $x_0$ such that the initial value problem $\d{y}{x} = f(x,y)$ has a unique solution on the interval $(a,b)$.

\b

\textbf{Example.}  Find the solution of the initial value problem $\d{y}{x} = \frac{x}{y}$, $y(2) = 1$.

\b

If $U$ is the open set $(-\infty,\infty) \times (0, \infty)$, then $U$ contains the point $(2,1)$ and the function $\frac{x}{y}$ is defined and continuous on $U$.  Furthermore, $\frac{\partial}{\partial y}\left( \frac{x}{y} \right) = \frac{-x}{y^2}$ which is continuous on $U$.	 Therefore, the initial value problem has a unique solution on some open interval.  To find it, we separate the variables to get the equation $y dy = x dx$, so $ \frac{y^2}{2} = \frac{x^2}{2} + \frac{C}{2}$.	 Therefore, $y = \pm \sqrt{x^2 + C}$.	 From the initial condition we get $1 = \pm \sqrt{4 + C}$, and since $1$ is positive, $1 =	 \sqrt{4 + C}$.	Solving this gives $C =-3 $.	 Therefore, $y =	 \sqrt{x^2 -3}$.	This solution is valid on the interval $(\sqrt{3},\infty)$, and it is unique.	 (Note that if $-\sqrt{2} <	 x < \sqrt{2}$, this function is not defined.

\b

A special case of the theorem covers the first-order linear equations $\d{y}{x} + p(x)y = q(x)$, where $p(x)$ and $q(x)$ are continuous functions.	If we write this as $\d{y}{x} = f(x,y)$, where $f(x,y) = q(x) - p(x)y$, then $f$ is continuous and $ \frac{\partial f}{\partial y} = -p(x)$ which is also continuous.	 Therefore, the theorem applies, and we get the following special case.

\b

\textbf{Corollary.} If $p(x)$ and $q(x)$ are continuous functions, then the initial value problem $\d{y}{x} + p(x)y = q(x)$, $y(x_0) = y_0$, has a unique solution.

\b

We saw that the solution of the ODE $\d{y}{x} + p(x)y = q(x)$ is $$y = e^{-\int p(t) dt} \int q(t)e^{\int p(t) dt} dt.$$  This will involve a constant $C$.	 This solution, with the $C$ is called the \textit{general solution} of the ODE, because any solution has that form.	 Any value of $C$ gives a \textit{particular solution}.

\b

\textbf{Example.} Find the general solution of the ODE $\d{x}{t} + x = t$, and find the particular solution corresponding to the initial condition $x(1) = 5$.

\b

An integrating factor is given by $\mu(t) = e^{\int 1 dt} = e^t$.  Multiplying by $\mu(t)$ we get $\d{e^t x}{t} = te^t$, so $e^tx = \int te^t dt =te^t - e^t + C$.	 Therefore, $x = t - 1 + Ce^{-t}$.	This is the general solution.

From the initial condition $x(1) = 5$, we get $5 = Ce^{-1}$, so $C = 5e$.  Therefore, we get the particular solution $x = t - 1 + 5e^{1-t}$.





\b


\{ Page 75 \hspace{1in} 7-10, 13, 14, 22(a), 25

\pagebreak

\centerline{{\sc Exact differential equations}}

\b


Recall from third semester calculus that a \textit{gradient field} is a vector field of the form $\nabla f = \left( \frac{\partial f}{\partial x} \right) \overrightarrow{i} + \left( \frac{\partial f}{\partial y} \right) \overrightarrow{j}$.  A \textit{differential form} is an expression of the form $M(x,y)dx + N(x,y)dy$.	A differential form $M(x,y)dx + N(x,y)dy$ is \textit{exact} if the vector field $M(x,y)\overrightarrow{i} + N(x,y)\overrightarrow{j}$ is a gradient field.

\b

\textbf{Examples.}

\begin{enumerate}

\item Show that the differential form $(2x + y) dx + (x + 1) dy$ is exact.	

\b

We need to find a function $f(x,y)$ such that $f_x = 2x + y$ and $f_y = x + 1$. From the first equation, we get $f(x,y) = x^2 + xy + \phi(y)$.	 Therefore, $f_y(x,y) = x + \phi'(y)$, so $\phi'(y) = 1$.  Therefore, $\phi(y) = y (+C)$, but we can ignore the $C$.	We can let $f(x,y) = x^2 + xy + y$, and check that this works.

\item Determine if the differential form $(3x + y)dx + 3xy^2 dy$ is exact.

\b

We want to see if there is a function $f(x,y)$ such that $f_x(x,y) = 3x + y$ and $f_y(x,y) = 3xy^2$.	If there is, then from the first equation, $f(x,y) = \frac{3x^2}{2} + xy + \phi(y)$.  From the second equation we get $x + \phi'(y) = 3xy^2$, which cannot be because the left side involves only $Y$ whereas the right side involves both $x$ and $y$.  Therefore, the differential form is not exact.







\end{enumerate}

\b

Now recall that the differential equation $\d{y}{x} = f(x,y)$ can be written in the form $M(x,y)dx + N(x,y)dy = 0$.

\b

\textbf{Theorem.} Suppose that $M(x,y)$ and $N(x,y)$ are functions such that $M$, $N$, $ \frac{\partial M}{\partial y}$, and	 $\frac{\partial N}{\partial x}$ are continuous on an open disk $D$.	 Then the differential form $M(x,y)dx + N(x,y)dy$ is exact if and only if $M_y = N_x$.	Furthermore, if $f(x,y)$ is a function such that $\nabla f = M \overrightarrow{i} + N \overrightarrow{j}$, then a solution to the ODE $M(x,y)dx + N(x,y)dy = 0$ is given by $f(x,y) = C$ where $C$ is a constant.


\b

What this says is that if $M(x,y)dx + N(x,y)dy = 0$ is an ODE such that $M_y = N_x$, then there is a function $f(x,y)$ such that $f_x = M$ and $f_y = N$, and that a solution is given by $f(x,y) = C$.  In this case, we say that the ODE $M(x,y)dx + N(x,y)dy = 0$ is \textit{exact}.  The function $f(x,y)$ is called a \textit{primitive function} for the ODE.

\b

Note, however, that if $M_y \ne M_x$, the function $f$ won't exist, so we have to try something else.	In some cases, though, we can fix that problem.

\b

%\pagebreak

\textbf{Examples.}


\begin{enumerate}


\item Solve the ODE $(\cos x + \cos^2 y) = 2x \sin y \cos y \d{y}{x}$.

\b

We can write this as $(\cos x + \cos^2 y) dx + (-2x \sin y \cos y) dy = 0$.	 $\frac{\partial (\cos x + \cos^2 y)}{\partial y} = -2\sin y \cos y$, and $\frac{\partial (-2x \sin y \cos y) }{\partial x} = -2\sin y \cos y$, so by the theorem, there is a function $f(x,y)$ such that $\nabla f = (\cos x + \cos^2 y) \overrightarrow{i} + (-2x \sin y \cos y)\overrightarrow{j}$.	We can find $f(x,y)$ as before, and we get $f(x,y) = \sin x + x \cos^2 y$.	 Therefore, a solution to the ODE is given by $\sin x + x \cos^2 y = C$.	


\item Solve the initial value problem $\d{y}{x} + \frac{2x + 6xy}{3x^2 + 3y^2}= 0$, $y(0) = 2$.

    \b

We note that by the theorem on uniqueness for ODEs, this problem has a unique solution.

The ODE can be written as  $(2x + 6xy)dx + (3x^2 + 3y^2)dy = 0$.  Since $ \frac{\partial (2x + 6xy)}{\partial y} = 6x = \frac{\partial (3x^2 + 3y^2)}{\partial x}$, the ODE is exact.	A primitive function is given by $f(x,y) = x^2 + 3x^2y + y^3$.  Therefore, the solution satisfies $x^2 + 3x^2y + y^3 = C$ for a constant $C$.  From the initial condition, when $x = 0$, $y = 2$, so $C = 8$.  Therefore, the solution is $x^2 + 3x^2y + y^3 = 8$.

\b

Sometimes, even if an equation is not exact, it can be made exact by multiplying by an appropriate integrating factor $\mu$.

\b

\textbf{Proposition.} Suppose that $M$, $N$, $M_x$, and $M_y$ are continuous functions such that $\frac{M_y - N_x}{N}$ does not involve the unknown $y$ [or $\frac{M_y - N_x}{M}$ does not involve the variable $x$].  Let $\mu$ be a solution of the ODE $\d{\mu}{x} = \left(\frac{M_y - N_x}{N}\right) \mu$ [or $\d{\mu}{y} = \left(\frac{M_y - N_x}{M}\right) \mu$]. Then multiplying the ODE $Mdx + Ndy = 0$ by $\mu$ makes the ODE exact.

\b

\textbf{Example.} Find an integrating factor which converts the ODE $(3x^3 + y)dx + 3x dy = 0$ to an exact ODE.

\b

Since $ \frac{\partial 3x^3 + y}{\partial y} = 1 \ne 3 = \frac{\partial 3x}{\partial x}$, the ODE is not exact.	 Here $\frac{M_y - N_x}{N} = \frac{1 - 3}{3x} = \frac{2}{3x}$, which involves only $x$, so an integrating factor $\mu$ is given by a solution to $\d{\mu}{x} = \left(-\frac{2}{3x} \right) \mu$.  This ODE is both separable and linear, so we can find a solution. A solution is given by $\mu = x^{-\frac{2}{3}}$.	 Now we multiply the original ODE by $\mu$ to get $(3x^{\frac{7}{3}} + x^{\frac{-2}{3}}y)dx + 3x^{\frac{1}{3}}dy = 0$.

\


\end{enumerate}


\b


\{ Page 99 \hspace{1in} 1-6, 13-15, 18, 19

\pagebreak

\centerline{{\sc Summary of first-order methods}}

\begin{itemize}

\item We can draw direction fields for ODEs of the form $\d{y}{x} = f(x,y)$ and use the direction fields to draw the graphs of solutions.

\item Autonomous ODEs have the form $\d{y}{x} = h(y)$.	We can solve these by writing them as $\left( \frac{1}{h(y)} \right) \d{y}{x} = 1$ and integrating, if we can integrate. We can see stable solutions, that is, constant solutions, by solving the equation $h(y) = 0$.

\item First order linear equations have the form $\d{y}{x} + p(x)y = q(x)$.	 We can solve these by multiplying by the integrating factor $\mu(x) = e^{\int p(x) dx}$.	Then the left hand side is $d{\mu y}{x}$ and we integrate.

\item Separable ODEs have the form $\d{y}{x} = g(x)h(y)$.  We solve these by writing the equation as $\left( \frac{1}{h(y)} \right) dy = g(x) dx$ and integrating.

\item An ODE is exact if it can be written as $M(x,y) dx + N(x,y) dy = 0$, where there is a function $f(x,y)$ whose gradient is $\langle M(x,y), N(x,y)\rangle$.	 In this case, a solution is given by $f(x,y) = C$.	 The ODE will be exact if and only if $M_y = N_x$.

\item An ODE $M(x,y) dx + N(x,y) dy = 0$ which is not exact can sometimes be made exact by multiplying by an appropriate integrating factor.


\end{itemize}

\end{document} 