Introduction to Differential Equations

In your previous calculus chapters, you learned how to find the derivative of a function. Now, we are going to flip that on its head. A differential equation is simply an equation that involves a derivative, like \( \frac{dy}{dx} \). Instead of finding a value for \( x \), our goal is to find the original function \( y = f(x) \) that makes the equation true.

Differential equations are incredibly powerful because they allow us to model how things change in the real world—from how a population grows to how a cup of coffee cools down. Don't worry if this seems a bit abstract at first; we will break it down into visual, numerical, and algebraic methods.

1. Setting Up Differential Equations from Context

Before we can solve an equation, we have to write it! In the IB Applications and Interpretation course, you will often be asked to "translate" a word problem into a differential equation.

Look for keywords that signal a rate of change:

  • "The rate of change of...": This always means a derivative, usually \( \frac{dy}{dt} \) or \( \frac{dx}{dt} \).
  • "Is proportional to...": This means you multiply by a constant \( k \).
  • "Increasing/Decreasing": This tells you whether the rate (and thus the constant \( k \)) should be positive or negative.

Example: "The rate of growth of a population \( P \) is proportional to the current population."
Translated: \( \frac{dP}{dt} = kP \)

2. Solving by Separation of Variables

This is the primary algebraic method for solving first-order differential equations. The goal is to get all the \( y \)'s on one side with \( dy \), and all the \( x \)'s on the other side with \( dx \).

Step-by-Step Process:
  1. Separate: Move terms so you have \( g(y) dy = f(x) dx \).
  2. Integrate: Put an integral sign on both sides: \( \int g(y) dy = \int f(x) dx \).
  3. Add the Constant: Don't forget the \( + c \) on one side!
  4. Solve for \( y \): Use algebra to isolate \( y \) if possible (this is called the general solution).
  5. Find \( c \): If you are given a specific point (an initial condition like \( y(0) = 5 \)), plug it in to find the particular solution.

Quick Review: Remember that \( \int \frac{1}{y} dy = \ln|y| + c \). This comes up very often in population and cooling models!

3. Slope Fields (Direction Fields)

Sometimes, a differential equation is too hard to solve by hand. A slope field is a visual way to see what the solution looks like without doing any integration.

Imagine a grid of points. At each point \( (x, y) \), we calculate the gradient using the formula \( \frac{dy}{dx} = f(x, y) \). We then draw a tiny little line segment with that exact slope.

  • If you "follow the arrows" starting from a specific point, you will trace the graph of a particular solution.
  • Horizontal segments mean the gradient is zero (potential maximum or minimum points).
  • Vertical segments (or very steep ones) mean the gradient is undefined or very large.

Did you know? Slope fields are like looking at a wind map. The arrows don't tell you exactly where you are, but they tell you exactly which way you'll be pushed if you stand there!

4. Euler's Method (First Order)

Euler's Method is a numerical approach. Instead of finding a formula for the curve, we take tiny "steps" along the tangent lines to estimate where the curve goes. It is essentially a repeated application of the formula for a straight line.

To use Euler's method, you need:
1. A starting point \( (x_0, y_0) \).
2. A step size \( h \) (how far we move in the \( x \) direction).
3. The differential equation \( \frac{dy}{dx} = f(x, y) \).

The Iterative Formula:

\( x_{n+1} = x_n + h \)

\( y_{n+1} = y_n + h \times f(x_n, y_n) \)

Common Mistake: Students often forget to multiply the gradient by the step size \( h \). Think of it as: New Value = Old Value + (Step Size \(\times\) Slope).

5. Euler's Method for Coupled Systems

In more complex models (like predator-prey relationships), we might have two variables changing at the same time, both depending on each other and time \( t \). This is a coupled system:

\( \frac{dx}{dt} = f_1(x, y, t) \)

\( \frac{dy}{dt} = f_2(x, y, t) \)

We apply Euler's method to both variables simultaneously at each step:

  1. \( t_{n+1} = t_n + h \)
  2. \( x_{n+1} = x_n + h \times \frac{dx}{dt} \) (evaluated at current \( t, x, y \))
  3. \( y_{n+1} = y_n + h \times \frac{dy}{dt} \) (evaluated at current \( t, x, y \))

Note: For more on how these systems behave visually, see the chapter on "Coupled systems and phase portraits".

6. Second-Order Differential Equations

A second-order differential equation involves the second derivative, \( \frac{d^2x}{dt^2} \). These are common in physics (acceleration). The syllabus requires two ways to handle these:

A. Numerical Solution (Euler's Method)

To use Euler's method on a second-order equation like \( \frac{d^2x}{dt^2} = f(x, \frac{dx}{dt}, t) \), we must first turn it into two first-order equations. We do this by inventing a new variable for velocity: \( v = \frac{dx}{dt} \).

This gives us the system:
\( \frac{dx}{dt} = v \)
\( \frac{dv}{dt} = f(x, v, t) \)

Now, you just use the coupled Euler's method described in the section above!

B. Exact Solutions

While most second-order problems in this course are solved numerically, you may be asked for exact solutions of simple forms (like constant acceleration). Usually, this involves integrating twice and using two initial conditions to find two different constants of integration (\( c_1 \) and \( c_2 \)).

Key Takeaways

1. Separation of Variables: Your go-to algebraic tool for \( \frac{dy}{dx} \). Get \( y \) with \( dy \) and integrate.

2. Slope Fields: The "weather map" of calculus. Follow the arrows to see the solution curve.

3. Euler’s Method: A "connect-the-dots" numerical tool. Use \( y_{new} = y_{old} + h \times \text{gradient} \). Smaller step sizes \( h \) give better accuracy.

4. Second Order: Always break second-order equations down into two first-order equations (\( x \) and \( v \)) before applying Euler's method.