Differential Equations Examples- Solving Techniques

What Are Differential Equations?

A differential equation is an equation that contains derivatives of a function. That's it. Nothing fancy. The derivative shows how a quantity changes, so these equations describe relationships between changing quantities.

For example, dy/dx = 3x² is a differential equation. You're trying to find the function y that, when differentiated, gives you 3x².

These equations show up everywhere. Physics, engineering, economics, biology. If something changes and that change depends on the current state, you're probably dealing with a differential equation.

First Order vs Higher Order

The order is determined by the highest derivative present.

First Order Differential Equations

These contain only the first derivative (dy/dx). They're the starting point for most beginners.

Example 1: Separation of Variables

Solve: dy/dx = 2x

This is the simplest case. Separate the variables:

dy = 2x dx

Integrate both sides:

∫dy = ∫2x dx

y = x² + C

Done. The constant C appears because differentiating a constant gives zero, so you always have to include it. This is the general solution.

Example 2: Separable Equation

Solve: dy/dx = xy

Separate x and y terms:

dy/y = x dx

Integrate:

∫(1/y)dy = ∫x dx

ln|y| = x²/2 + C

Exponentiate:

y = Ae^(x²/2)

where A = ±e^C is a constant.

Second Order Differential Equations

These contain the second derivative (d²y/dx²). They show up in vibration analysis, spring systems, and electrical circuits.

Example 3: Second Order Linear with Constant Coefficients

Solve: d²y/dx² - 3dy/dx + 2y = 0

Start with the characteristic equation. Replace d²y/dx² with r², dy/dx with r, and y with 1:

r² - 3r + 2 = 0

Factor:

(r - 1)(r - 2) = 0

r = 1 or r = 2

Since you have two distinct real roots, the general solution is:

y = C₁eˣ + C₂e²ˣ

Example 4: Repeated Roots

Solve: d²y/dx² - 4dy/dx + 4y = 0

Characteristic equation:

r² - 4r + 4 = 0

(r - 2)² = 0

r = 2 (repeated twice)

When roots repeat, you need both e^(rx) and xe^(rx):

y = C₁e²ˣ + C₂xe²ˣ

Linear vs Nonlinear

This distinction matters because the solution methods differ completely.

Example 5: Identifying Linear vs Nonlinear

Solving Techniques Comparison

TechniqueWhen to UseExample
Separation of VariablesEquation can be written as f(x)dx = g(y)dydy/dx = xy
Integrating FactorLinear first order: dy/dx + P(x)y = Q(x)dy/dx + 2y = x
Characteristic EquationLinear with constant coefficientsy'' + 2y' + y = 0
Variation of ParametersNon-homogeneous linear, when undetermined coefficients won't worky'' + y = tan(x)
Laplace TransformsInitial value problems, discontinuous forcingy'' + y = f(t), y(0)=0

Integrating Factor Method

This solves any linear first order equation of the form dy/dx + P(x)y = Q(x).

Example 6: dy/dx + (2/x)y = x²

Step 1: Find the integrating factor

μ(x) = e^(∫P(x)dx) = e^(∫(2/x)dx) = e^(2ln|x|) = x²

Step 2: Multiply the entire equation by μ

x²dy/dx + 2xy = x⁴

Step 3: Recognize the left side is d/dx(μy)

d/dx(x²y) = x⁴

Step 4: Integrate

x²y = ∫x⁴ dx = x⁵/5 + C

Step 5: Solve for y

y = x³/5 + Cx⁻²

Getting Started: Your Solving Workflow

Follow these steps for any differential equation:

Step 1: Identify the Order

Look at the highest derivative. This tells you how many initial conditions you need for a unique solution.

Step 2: Check if it's Linear

If yes, you have more tools available. If no, prepare for harder mathematics or numerical methods.

Step 3: Check for Homogeneity

Homogeneous means the right side equals zero. Non-homogeneous equations need a particular solution on top of the general homogeneous solution.

Step 4: Try Separation First

If you can separate x and y terms, do it. The simplest solution is usually the right one.

Step 5: Use an Integrating Factor if Needed

For linear first order equations that aren't separable.

Step 6: Set Up the Characteristic Equation for Higher Order

Replace derivatives with powers of r. Solve the polynomial. Read off the solution based on root type.

Practical Example:RC Circuit

A capacitor charges according to RC(dV/dt) + V = V₀, where V is voltage, R is resistance, C is capacitance, and V₀ is source voltage.

This is linear first order. Rearrange:

dV/dt + (1/RC)V = V₀/RC

Integrating factor: μ = e^(t/RC)

Solution:

V(t) = V₀(1 - e^(-t/RC))

The capacitor voltage rises exponentially and approaches V₀. The time constant RC tells you how fast. After 5RC, you're within 1% of the final value.

When Analytical Solutions Don't Exist

Most nonlinear differential equations cannot be solved with elementary functions. This isn't a failure—it's reality.

Options:

Euler's method is straightforward. Start at (x₀, y₀). Take small steps:

yₙ₊₁ = yₙ + h·f(xₙ, yₙ)

where h is your step size. Smaller h means more accuracy, more computation.

The Bottom Line

Differential equations are solved by matching technique to problem type. Start simple. Check linearity. Try separation first. Move to integrating factors for linear first order. Use characteristic equations for linear constant coefficient equations of higher order.

Most problems you encounter in undergraduate courses fall into these categories. The ones that don't usually require numerical work or specialized transforms.

Work through examples until the patterns become automatic. That's how this stuff actually clicks.