Unit 7: Differential Equations

Differential equations, solutions, and initial value problems

In related rates, you used derivatives to model how one changing quantity affects another. Differential equations take that same “change over time (or over another variable)” idea and make it the entire problem: when variables are not constant, you often describe them through a derivative, and a differential equation is an equation that relates an unknown function to one or more of its derivatives. Instead of finding a single number, you are asked to find a whole function whose rate of change follows a rule.

This matters because many real-world situations are naturally described by rates:

  • population changes at a rate related to the current population,
  • a cup of coffee cools at a rate related to how far it is from room temperature,
  • money grows at a rate related to how much you already have.

Calculus gives you two complementary perspectives:

  • A derivative like \frac{dy}{dx} tells you instantaneous change.
  • A differential equation uses that derivative to define a relationship that determines how the whole function behaves.

What counts as a “solution”?

A solution to a differential equation is a function that makes the equation true when you substitute the function and its derivatives into the equation.

For example, consider the differential equation

\frac{dy}{dx} = 3y

If you propose y = Ce^{3x} (where C is a constant), then

\frac{dy}{dx} = 3Ce^{3x}

and since 3y = 3Ce^{3x}, it works. So y = Ce^{3x} is a family of solutions.

A common misconception is to think you “solve” a differential equation by finding a single number. Instead, you almost always get a function (often a whole family of functions).

General solution vs. particular solution

A general solution includes an arbitrary constant (or constants). It represents a whole family of solutions. A particular solution is one specific function from that family, found by using an additional condition.

That additional condition is often an initial condition, which gives the value of the function at a particular input. When a differential equation is paired with an initial condition, the problem is called an initial value problem (IVP).

Example of an IVP:

\frac{dy}{dx} = 3y

y(0) = 5

The initial condition selects the one solution curve that passes through \left(0,5\right).

Notation you must be comfortable with

In AP Calculus, the derivative may be written in multiple equivalent ways.

MeaningCommon notations
derivative of y with respect to x\frac{dy}{dx}, y'
derivative of y with respect to t\frac{dy}{dt}
second derivative\frac{d^2y}{dx^2}, y''

Also, you will often see a differential equation written as

\frac{dy}{dx} = f(x,y)

This emphasizes an important idea: the slope of the solution curve at a point depends on both x and y.

Checking (verifying) a proposed solution

A frequent AP skill is verification: show that a given function satisfies a differential equation.

Process:

  1. Compute the derivative(s) the equation requires.
  2. Substitute the function and derivatives into the differential equation.
  3. Simplify and check both sides match for all relevant inputs.

This is often faster and safer than trying to re-solve a differential equation during an exam.

Worked example: verify a solution

Verify that y = \frac{1}{x^2} is a solution to

\frac{dy}{dx} = -\frac{2y}{x}

Differentiate:

y = x^{-2}

\frac{dy}{dx} = -2x^{-3}

Substitute into the right-hand side:

-\frac{2y}{x} = -\frac{2\left(x^{-2}\right)}{x} = -2x^{-3}

Left side equals right side, so it is a solution (on any interval not crossing x=0).

Why initial conditions matter (uniqueness idea in practice)

Conceptually, you can think of the differential equation as describing the “direction” (slope) of solution curves everywhere. The initial condition pins down which curve you are on.

A common error is to forget to apply the initial condition at the end, leaving an answer with an undetermined constant.

Exam Focus
  • Typical question patterns:
    • Verify that a given function satisfies a differential equation.
    • Distinguish general vs. particular solution; use an initial condition to find the constant.
    • Interpret what \frac{dy}{dx} = f(x,y) says about slopes at points.
  • Common mistakes:
    • Substituting incorrectly (for example, plugging in y' where y belongs).
    • Solving for C before simplifying (leading to algebra errors).
    • Ignoring domain restrictions (like dividing by x or y when they could be zero).

Slope fields and qualitative understanding of solutions

A slope field (also called a direction field) is a visual representation of a first-order differential equation of the form

\frac{dy}{dx} = f(x,y)

At many points \left(x,y\right) in the plane, you draw a short line segment with slope f(x,y). If a solution curve passes through that point, it must be tangent to that segment.

You construct a slope field by plugging in the point’s x-value and y-value (or just one of them if the equation only depends on one variable) into the differential equation, then drawing that slope at the point.

Quick example: slope field for \frac{dy}{dx} = x

Because the slope depends only on x, all points with the same x-coordinate share the same slope. For instance, at any point where x=-1,

\frac{dy}{dx} = -1

so the little segment you draw has slope -1.

How to read a slope field

When you look at the field, you are looking at “allowed slopes.” A solution curve is a path that always follows those tiny tangent segments.

Key ideas to look for:

  • Where slopes are zero: wherever f(x,y)=0, the slope segments are horizontal. Solution curves flatten there.
  • Where slopes are positive or negative: if f(x,y)>0, solutions rise as x increases; if f(x,y)

A subtle but important point: a slope field does not give you the height of the function directly. It gives you the trend of the function depending on where you are.

Isoclines: a structure you can exploit

An isocline is a curve in the xy-plane along which the slope \frac{dy}{dx} is constant.

If

\frac{dy}{dx} = x + y

then the slope equals a constant k when

x + y = k

which is a line

y = -x + k

Along any one of these lines, the slope segments all have the same slope. Isoclines help you sketch a slope field quickly and accurately.

Using a slope field with an initial condition

If you are told a solution passes through \left(a,b\right), you can sketch the approximate solution curve by starting at that point and drawing a smooth curve that follows the direction field.

To sketch the solution curve, you “flow” with the slopes:

  • keep the curve smooth (so it can have a tangent where it’s drawn),
  • make sure it follows the direction of the short segments,
  • avoid abrupt turns that ignore the field.

Because this is done by hand, it does not have to be exact; it just needs to be consistent with the tangent segments.

Worked example: qualitative reasoning from a differential equation

Suppose

\frac{dy}{dx} = y(2-y)

Without solving, analyze where solutions increase or decrease.

The sign of \frac{dy}{dx} depends on y(2-y).

  • If 0
  • If y>2, then 2-y

Also, slopes are zero at y=0 and y=2. Those are equilibrium (constant) solutions.

Even without an explicit formula, you can predict: solutions starting between 0 and 2 rise toward 2, and solutions starting above 2 fall toward 2.

Equilibrium solutions and stability (intuitive level)

An equilibrium solution is a constant solution y=c where the derivative is zero.

For autonomous differential equations of the form

\frac{dy}{dx} = g(y)

equilibria occur where g(y)=0.

Stability idea you can use from the slope field:

  • An equilibrium is stable if nearby solutions move toward it over time.
  • It is unstable if nearby solutions move away.

In the example \frac{dy}{dx} = y(2-y), y=2 is stable (solutions move toward it), while y=0 is unstable (solutions move away if you start slightly above 0).

Exam Focus
  • Typical question patterns:
    • Sketch a slope field from \frac{dy}{dx} = f(x,y) using sample points or isoclines.
    • Draw the solution curve through a given point on a provided slope field.
    • Identify equilibria and describe long-term behavior from an autonomous differential equation.
    • Sketch a solution curve given a slope field by following the “flow” of the segments.
  • Common mistakes:
    • Confusing the slope field with the graph of the solution (they are different objects).
    • Drawing solution curves that cross (solutions to a well-behaved first-order IVP should not cross for the same differential equation and initial condition).
    • Ignoring that slope depends on both x and y (for non-autonomous equations).
    • Drawing a curve that does not follow the slope segments or turns abruptly.

Euler’s Method: numerical approximation of solutions

Many differential equations cannot be solved with elementary algebraic steps. Euler’s Method is a numerical technique to approximate a solution to an IVP by repeatedly using the tangent line idea.

The key mindset: if you know the current point \left(x_n,y_n\right) on the solution curve, the differential equation tells you the slope there:

\frac{dy}{dx} = f(x,y)

Then you approximate the next value by moving a small step h in x using the slope as if it stayed constant over that step.

The Euler update formula (and what it means)

For step size h,

x_{n+1} = x_n + h

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

Interpretation:

  • f\left(x_n,y_n\right) is the slope at the current point.
  • h f\left(x_n,y_n\right) is the approximate change in y over a small change h in x.

This is just the tangent line approximation:

\Delta y \approx \left(\frac{dy}{dx}\right)\Delta x

except the derivative comes from the differential equation.

Why step size matters

Euler’s method approximates a curve using straight-line segments. If h is large, the straight segments can miss important curvature, creating larger error. If h is smaller, you generally get better accuracy (at the cost of more steps).

Concavity connection: if the true solution is concave up, tangent lines tend to lie below the curve, so Euler can underestimate; if concave down, it can overestimate. This is not a guaranteed rule in every situation, but it’s a good diagnostic when the slope field or second-derivative reasoning is available.

Doing Euler’s Method in a table

A table organizes repeated calculations. Columns typically include:

  • x_n
  • y_n
  • f\left(x_n,y_n\right)
  • y_{n+1} = y_n + h f\left(x_n,y_n\right)
Worked example: Euler’s method with 3 steps

Approximate y(0.3) for the IVP

\frac{dy}{dx} = x + y

y(0)=1

using step size h=0.1.

Start: x_0=0, y_0=1.

Step 1 (to x_1=0.1):

f\left(x_0,y_0\right) = 0 + 1 = 1

y_1 = y_0 + 0.1\cdot 1 = 1.1

Step 2 (to x_2=0.2):

f\left(x_1,y_1\right) = 0.1 + 1.1 = 1.2

y_2 = y_1 + 0.1\cdot 1.2 = 1.22

Step 3 (to x_3=0.3):

f\left(x_2,y_2\right) = 0.2 + 1.22 = 1.42

y_3 = y_2 + 0.1\cdot 1.42 = 1.362

So Euler’s Method gives the approximation y(0.3) \approx 1.362.

Euler’s method on calculator output

Sometimes you’re given a table of values and asked to identify that it comes from Euler’s method, or to compute one missing entry. The giveaway is the repeated pattern

y_{n+1} - y_n = h f\left(x_n,y_n\right)

If you can compute the left-hand difference and see it matches h f\left(x_n,y_n\right), you’ve identified the method.

Exam Focus
  • Typical question patterns:
    • Use Euler’s method (often in a table) to approximate y(b) given \frac{dy}{dx}=f(x,y), y(a)=y_0, and step size h.
    • Determine whether Euler’s method overestimates or underestimates based on slope field or concavity.
    • Fill in a missing value in an Euler table.
  • Common mistakes:
    • Using f\left(x_{n+1},y_{n+1}\right) instead of f\left(x_n,y_n\right) (that would be a different method).
    • Forgetting to multiply by step size h.
    • Arithmetic drift across many steps (write intermediate values clearly).

Solving separable differential equations

A separable differential equation is one where you can rewrite the equation so that all y-terms are on one side and all x-terms are on the other. This is the most important symbolic solving technique in AP Calculus AB for differential equations.

You may hear a helpful memory trick for these problems: SIPPY.

  • S: Separate (get dy and dx on separate sides)
  • I: Integrate (take antiderivatives)
  • P: Plus C (include the constant of integration)
  • P: Plug in your initial condition (if it’s an IVP)
  • Y: Y equals (solve for y if possible)

The reason separation works is tied to differential notation. When you see

\frac{dy}{dx} = f(x)g(y)

you can rearrange algebraically so that

\frac{1}{g(y)}dy = f(x)dx

and then integrate both sides. (It’s important to notice that you generally cannot “just integrate both sides” unless you’ve put the equation into a form where integration makes sense, which is exactly what separation accomplishes.)

The standard solving process

Suppose you have

\frac{dy}{dx} = f(x)g(y)

  1. Separate variables:

\frac{1}{g(y)}dy = f(x)dx

  1. Integrate both sides:

\int \frac{1}{g(y)}dy = \int f(x)dx

  1. Add the constant of integration:

\int \frac{1}{g(y)}dy = \int f(x)dx + C

  1. Solve for y if possible (sometimes an implicit form is acceptable).

  2. Apply the initial condition (for an IVP) to find C.

Two common pitfalls:

  • forgetting the constant C,
  • doing algebra too quickly after integrating (especially when solving for y).

Worked example: a basic separable equation

Solve the IVP

\frac{dy}{dx} = xy

y(0)=3

Separate:

\frac{1}{y}dy = xdx

Integrate:

\int \frac{1}{y}dy = \int xdx

\ln|y| = \frac{x^2}{2} + C

Solve for y:

y = Ke^{\frac{x^2}{2}}

Apply y(0)=3 to get K=3, so

y = 3e^{\frac{x^2}{2}}

Worked example: SIPPY in action

Solve the IVP

\frac{dy}{dx} = \frac{4x}{y}

y(0)=5

Separate:

y\,dy = 4x\,dx

Integrate:

\int y\,dy = \int 4x\,dx

\frac{y^2}{2} = 2x^2 + C

Plug in the initial condition:

\frac{25}{2} = 0 + C

So

\frac{y^2}{2} = 2x^2 + \frac{25}{2}

Multiply by 2:

y^2 = 4x^2 + 25

Now solve for y. Because y(0)=5 is positive, take the positive branch:

y = \sqrt{4x^2 + 25}

Implicit solutions are sometimes the natural form

Not every separable differential equation solves neatly for y. You may end with an equation involving both x and y, such as

\ln|y| + y = x^2 + C

That is still a valid solution (implicit). On AP free-response, implicit solutions are commonly accepted unless the prompt specifically asks you to solve for y.

Using separation to answer a question without fully solving

A powerful technique: if you have an IVP and want y at a particular x, you can integrate with bounds.

If

\frac{dy}{dx} = f(x)g(y)

and y(a)=y_a, then after separation,

\frac{1}{g(y)}dy = f(x)dx

Integrate from x=a to x=b and from y=y_a to y=y_b:

\int_{y_a}^{y_b} \frac{1}{g(y)}dy = \int_a^b f(x)dx

This can sometimes find y_b without explicitly solving for C first.

Worked example: separation with definite integrals

Given

\frac{dy}{dx} = \frac{x}{1+y^2}

y(0)=0

Find y(1).

Separate:

(1+y^2)dy = xdx

Integrate with bounds:

\int_{0}^{y(1)} (1+y^2)dy = \int_{0}^{1} xdx

Compute:

\left[y + \frac{y^3}{3}\right]_{0}^{y(1)} = \left[\frac{x^2}{2}\right]_{0}^{1}

So

y(1) + \frac{(y(1))^3}{3} = \frac{1}{2}

This is an implicit equation for y(1).

Exam Focus
  • Typical question patterns:
    • Solve a separable differential equation (often with an initial condition).
    • Use separation and integrals to relate x and y (sometimes with definite integrals).
    • Determine a constant in a general solution using a point on the solution curve.
  • Common mistakes:
    • Incorrect separation (especially when algebraic manipulation is needed first).
    • Losing absolute value in \ln|y| situations (or mishandling it when solving for the constant).
    • Forgetting to apply the initial condition, leaving C in the final answer.

Exponential growth and decay as differential equations

One of the most important modeling ideas in this unit is: a quantity changes at a rate proportional to the quantity itself.

If a quantity P(t) grows faster when it is larger and slower when it is smaller, a natural model is

\frac{dP}{dt} = kP

This describes many basic “percentage growth” processes, including idealized population growth, continuous compound interest, and radioactive decay (with negative k).

Solving \frac{dP}{dt} = kP

Separate:

\frac{1}{P}dP = kdt

Integrate:

\ln|P| = kt + C

Exponentiate:

P = Ce^{kt}

If P(0)=P_0, then C=P_0 and

P(t) = P_0 e^{kt}

Interpreting the constant k

The constant k is a continuous growth rate.

  • If k>0, the quantity grows exponentially.
  • If k

A common mistake is to treat k as a percent without converting. If something grows at 5\% per year continuously, then k=0.05 per year.

Half-life and doubling time

For decay, half-life T satisfies

\frac{1}{2} = e^{kT}

so

T = \frac{\ln\left(\frac{1}{2}\right)}{k}

For growth, doubling time satisfies

2 = e^{kT}

so

T = \frac{\ln 2}{k}

Newton’s Law of Cooling (a classic separable model)

Newton’s Law of Cooling says the rate at which an object’s temperature changes is proportional to the difference between its temperature and ambient temperature.

Let T(t) be the object’s temperature and T_a be constant ambient temperature:

\frac{dT}{dt} = k\left(T - T_a\right)

Separate and integrate to get

T(t) = T_a + Ce^{kt}

Interpretation: the temperature approaches T_a over time.

Worked example: cooling with an initial condition

A room is at 20 degrees. Coffee is poured at 90 degrees. After some time, the coffee is 70 degrees at t=5 minutes. Model with

\frac{dT}{dt} = k\left(T - 20\right)

Solution form:

T(t) = 20 + Ce^{kt}

Use T(0)=90:

90 = 20 + C

So C=70 and

T(t) = 20 + 70e^{kt}

Use T(5)=70:

70 = 20 + 70e^{5k}

\frac{5}{7} = e^{5k}

k = \frac{1}{5}\ln\left(\frac{5}{7}\right)

Exam Focus
  • Typical question patterns:
    • Set up and or solve \frac{dP}{dt} = kP from a “proportional to the amount” description.
    • Use data to determine k (or half-life or doubling time) and then predict a future value.
    • Apply Newton’s Law of Cooling form and interpret the long-term behavior.
  • Common mistakes:
    • Writing P = P_0 kt (linear) instead of exponential growth.
    • Confusing discrete percent growth with continuous rate k.
    • Forgetting that ambient temperature shifts the cooling model: it’s T - T_a, not just T.

Logistic differential equations and carrying capacity

Pure exponential growth assumes unlimited resources. In many real systems, growth slows as the population gets large. The logistic differential equation captures this “fast at first, then leveling off” behavior:

\frac{dP}{dt} = kP\left(1 - \frac{P}{L}\right)

Here L is the carrying capacity.

Understanding the factors in the logistic equation

kP\left(1 - \frac{P}{L}\right)

  • The factor P says: if the population is tiny, growth is tiny.
  • The factor \left(1 - \frac{P}{L}\right) says: if P is near L, growth slows to zero.
  • If P>L, then \frac{dP}{dt}

So P=L is an equilibrium, typically stable.

Qualitative behavior without solving

  • If 0
  • If P>L, then \frac{dP}{dt}

Solving the logistic equation (separation + partial fractions)

Rewrite:

\frac{dP}{dt} = \frac{k}{L}P(L-P)

Separate:

\frac{dP}{P(L-P)} = \frac{k}{L}dt

Decompose:

\frac{1}{P(L-P)} = \frac{A}{P} + \frac{B}{L-P}

Solving gives

A = \frac{1}{L}

B = \frac{1}{L}

So

\frac{1}{P(L-P)} = \frac{1}{L}\left(\frac{1}{P} + \frac{1}{L-P}\right)

Integrate:

\ln|P| - \ln|L-P| = kt + C

Combine logs:

\ln\left|\frac{P}{L-P}\right| = kt + C

Exponentiate and solve for P:

P(t) = \frac{L}{1+Ce^{-kt}}

Applying an initial condition

If P(0)=P_0, then

P_0 = \frac{L}{1+C}

so

C = \frac{L-P_0}{P_0}

The inflection point idea (growth is fastest in the middle)

The maximum growth rate occurs when

P = \frac{L}{2}

because \frac{dP}{dt} as a function of P is a quadratic maximized at L/2.

Exam Focus
  • Typical question patterns:
    • Identify carrying capacity and equilibria from \frac{dP}{dt} = kP\left(1 - \frac{P}{L}\right).
    • Solve a logistic IVP (often requiring separation and partial fractions).
    • Determine long-term behavior: compute \lim_{t\to \infty} P(t) from the model.
  • Common mistakes:
    • Treating logistic growth as exponential and missing the leveling-off behavior.
    • Incorrect partial fractions or sign error in integrating \frac{1}{L-P}.
    • Forgetting that if P(0)>0, the solution typically approaches L, not infinity.

Building differential equations from contextual descriptions (modeling)

A major goal of this unit is translating words into a differential equation, then using calculus tools to analyze the model. The hardest part is often not the calculus but choosing the correct relationship.

A modeling template: “rate of change equals …”

Start by naming the quantity that changes, say y(t). Then write:

\frac{dy}{dt} = \text{(expression describing the rate)}

Then check units, check signs, and check extreme behavior (does it make sense when y is very large or near zero?).

Recognizing common rate statements

“Proportional to the amount present”:

\frac{dy}{dt} = ky

“Proportional to the difference between the amount and a baseline”:

\frac{dy}{dt} = k(y - A)

“Proportional to the amount and the remaining capacity”:

\frac{dy}{dt} = ky\left(1-\frac{y}{L}\right)

Interpreting solutions in context: units and meaning

When you solve an IVP, your final expression should make contextual sense. For example, if P(t) is a population, then P(t) should not be negative. If t is in years, then constants in the exponent must have units that make the exponent dimensionless (so k has units 1 per year).

Using the differential equation to answer questions without solving

Example: when is a function increasing fastest?

Suppose a population satisfies

\frac{dP}{dt} = 0.4P\left(1-\frac{P}{500}\right)

The population increases fastest when the right-hand side is maximum, which occurs at

P = 250

Example: interpreting a slope value

If you are told \frac{dy}{dx} = f(x,y) and given a point, you can compute the slope there immediately by substitution.

Tangent line approximation using the differential equation

If a solution passes through \left(a,b\right), then the slope at that point is

m = f(a,b)

and the tangent line approximation is

y \approx b + f(a,b)(x-a)

This is essentially one Euler step with step size x-a.

Worked example: tangent line from a differential equation

Given

\frac{dy}{dx} = x^2 - y

y(1)=2

Slope at \left(1,2\right):

m = 1^2 - 2 = -1

Tangent line approximation:

y \approx 2 + (-1)(x-1)

At x=1.1:

y(1.1) \approx 1.9

Exam Focus
  • Typical question patterns:
    • Translate a verbal rate statement into \frac{dy}{dt} = \dots.
    • Use the differential equation to compute a slope, tangent line, or to justify increasing or decreasing behavior.
    • Interpret constants (what does k represent, what does L represent?).
  • Common mistakes:
    • Writing a model that has the wrong sign (predicting growth when the situation says decay).
    • Forgetting to define variables and units (especially in free-response justification).
    • Solving when the question only asked for qualitative analysis (wasting time and increasing error risk).

Connecting representations: equation, slope field, table, and graph

AP Calculus problems often test whether you can move between multiple representations of the same idea:

  • the differential equation \frac{dy}{dx}=f(x,y),
  • a slope field,
  • a table of approximate values (Euler’s method),
  • the graph of a particular solution with an initial condition.

From differential equation to slope field

To sketch or interpret a slope field, you repeatedly evaluate f(x,y) at points. You are not solving for y; you are describing local slopes.

A reliable approach:

  1. Pick several points (often a grid).
  2. Compute f(x,y) at each point.
  3. Draw a short segment with that slope.

If the equation is autonomous \frac{dy}{dx}=g(y), slopes only depend on y. Then each horizontal row has the same slope, which makes sketching much faster.

From slope field to solution behavior

A slope field can tell you whether solutions increase or decrease, whether they level off toward an equilibrium, whether they blow up, and whether different initial values lead to different long-term outcomes. You still need an initial condition to pick a specific curve.

From differential equation to Euler table

Euler’s method is a computational version of the tangent line idea. Each step uses

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

so the table encodes a piecewise linear approximation to the true solution.

From graph back to the differential equation

Connections to use:

  • If \frac{dy}{dx}>0 in a region, the solution graph must be increasing there.
  • If \frac{dy}{dx}=0 along a curve (like y=2), solution graphs can level off or have horizontal tangents there.
  • If you can compute \frac{d^2y}{dx^2} by differentiating the differential equation, you can analyze concavity and connect it to overestimation or underestimation in Euler’s method.

Differentiating a differential equation to get concavity

If

\frac{dy}{dx} = f(x,y)

then

\frac{d^2y}{dx^2} = \frac{d}{dx}\left(f(x,y)\right)

Because y depends on x, differentiating f(x,y) may require the chain rule. In AP Calculus AB, this often appears in simpler cases where substitution keeps it manageable.

Worked example: concavity from a differential equation

Given

\frac{dy}{dx} = x - y

Differentiate both sides:

\frac{d^2y}{dx^2} = 1 - \frac{dy}{dx}

Substitute \frac{dy}{dx} = x-y:

\frac{d^2y}{dx^2} = 1 - x + y

Exam Focus
  • Typical question patterns:
    • Match a differential equation to the correct slope field or solution curve.
    • Use a slope field to compare values of solutions at a given x.
    • Use Euler’s method data to approximate a value and interpret what the approximation means.
  • Common mistakes:
    • Treating an Euler approximation as exact (especially when comparing to an exact solution).
    • Drawing solution curves that ignore the given slope segments.
    • Mixing up axes or stepping in the wrong direction when using Euler’s method.