Basics of Differential Equations

Differential Equations
Definitions
A Differential Equations (DE) is an equation that relates a function y(x) to some of its derivatives y′, y′′,... and other functions in x.
Examples
y′=y+2sinx -- first order
y′′′−2y′′− x=2ey -- third order
- The Order of a DE is the highest order derivative that appears in that DE
- If the DE of the form y′=f(y) (the independent variable doesn't affect the equation), then it is called autonomous
Some Applicatoins
- Population growth: dtdP=kP
- Logistic growth: dtdP=kP(1−MP)
- Motions of spring: dt2d2x=−mkx
- Newton's law of heating and cooling: dtdT=k(T−Tsurround)
Solutions to a DE
A General Solution to a DE is a solution y=C... that involves a constant C (this represents a whole family of solutions)
Example
Show that Ae2x+Be3x is the general solution for the differential equation, dx2 d2y−5 dx dy+6y=0.
Left hand side of the equation:
dx2d2y−5dxdy+6y
=(4Ae2x+9Be3x)−5(2Ae2x+3Be3x)+6(Ae2x+Be3x)
=0
This equals the right hand side of the equation.
Therefore, it is a solution for the differential equation.
In fact, it is a general solution because the constants A and B can take on any values (it is not specified).
An Initial Value Problem (IVP) is a DE problem where a side/initial condition is given. In this case, the solution we get is a particular/specific solution
Example
Verify that y=2ex is the particular solution to the DE y′=y with y(0)=2
Left hand side of the equation:
y′
=2ex
This equals the right hand side of the equation.
Also, y(0)=2e0=2, so it satisfies the initial condition
An Equilibrium Solution is a solution to a DE such that y′=0

Direction Fields/Slope Fields
Sometimes it's helpful to create a graph to show the solutions to a DE -- we sketch short lines representing the value of the derivative at various points (x,y)
Strategies for Sketching Direction Fields
- Set x=0 (the y-axis): Figure out what happens to the derivatives as y increases (moves up the y-axis) or decreases (moves down the y-axis)
- Set y=0 (the x-axis): Figure out what happens to the derivatives as x increases (moves right on the x-axis) or decreases (moves left on the x-axis)
- Find out when the derivative is 0--these correspond to horizontal tangent lines
- Find other spcecial values of the derivative
Example
Sketch the direction field for the DE y′=x+y, then sketch the particular solution that passes through (0,1)


Euler's Method
Instead of solving for a solution to a DE, we can sometimes approximate the solution using Euler's Method.
If you are given the following in the question, you'll be able to approximate the solution at any particular point.
- dxdy=F(x,y)
- Initial conidtion y0=y(x0)
- Step size h
How do we approximate the solution to the DE?
1. Create a table

2. Fill out the xn column (xn=xn−1+h)

3. Fill out the yn column (yn=yn−1+hF(xn−1, yn−1))
Example
Given that y′=2x−y and y(0)=0, using a step size of 0.1, estimate y(0.3).

Therefore, y(0.3)≈0.058.
Practice: Euler's Method
Use Euler's method with step size 0.5 to approximate the value of y(2), where y(x) is the solution of the initial-value problem y′=xy−y2, y(0)=1