This page collects carefully crafted differential equations problems organized by topic and difficulty. Whether you are studying separable equations, first-order linear ODEs, initial value problems, second-order homogeneous equations, characteristic equations, undetermined coefficients, or variation of parameters, each section below follows a pedagogical progression from easy to hard, with hints and full step-by-step solutions.
Contents6 sections
Separable Differential Equations
A differential equation is separable if it can be written in the form dxdy=f(x)g(y). The technique requires isolating all y-terms on one side and all x-terms on the other, then integrating both sides. These problems form the foundation of first-order ODE methods and appear consistently on calculus and differential equations examinations.
Problem 1: Basic Separation of Variables
Easy
Consider the differential equation dxdy=3x2y.
Find the general solution by separating variables.
Find the particular solution satisfying y(0)=2.
Hint
Divide both sides by y (assuming y=0) and multiply both sides by dx. You will then be able to integrate ∫y1dy on the left and ∫3x2dx on the right. For part 2, substitute the initial condition into the general solution to solve for the constant C.
View Solution
Solution to question 1:
Separate variables:
y1dy=3x2dx
Integrate both sides:
ln∣y∣=x3+C1
Exponentiate both sides:
y=Cex3,C∈R,C=0Solution to question 2:
Apply y(0)=2:
2=Ce0⟹C=2y=2ex3
Problem 2: Separation with a Trigonometric Right-Hand Side
Easy
Consider the differential equation dxdy=cosx⋅e−y.
Find the general implicit solution.
Solve explicitly for y and apply the initial condition y(0)=0.
Hint
Multiply both sides by ey to collect all y-terms on the left. The right side becomes cosxdx. Integrate both sides and then isolate y using the natural logarithm.
View Solution
Solution to question 1:
Rewrite as eydy=cosxdx and integrate:
ey=sinx+CSolution to question 2:
Take the natural log to solve explicitly:
y=ln(sinx+C)
Apply y(0)=0: ln(0+C)=0⟹C=1.
y=ln(sinx+1)
Problem 3: Rational Separable Equation with an Initial Value
Medium
Consider the differential equation (1+x2)dxdy=xy2 with initial condition y(0)=1.
Separate variables and find the general solution.
Apply the initial condition and determine the interval of validity of the solution.
Hint
Divide both sides by y2(1+x2). On the x-side you will need to integrate ∫1+x2xdx; consider the substitution u=1+x2. To find the interval of validity, determine where the particular solution is defined and continuous.
View Solution
Solution to question 1:
Separate:
y2dy=1+x2xdx
Integrate both sides:
−y1=21ln(1+x2)+C
General solution (implicit):
y=21ln(1+x2)+C−1Solution to question 2:
Apply y(0)=1: −1=C, so C=−1.
y=1−21ln(1+x2)1
The solution is valid as long as the denominator is nonzero: ln(1+x2)=2, i.e., x2=e2−1. The interval of validity containing x=0 is:
−e2−1<x<e2−1
Problem 4: Bernoulli-Type Separable Equation
Hard
Consider the equation dxdy=x2−1y2−1 for x>1, y>1.
Use partial fractions on both sides to find the general solution in implicit form.
Verify that y=x is a particular solution and comment on how it fits into the general family.
Hint
After separating, you will integrate ∫y2−1dy and ∫x2−1dx. Both require the same partial fraction decomposition: t2−11=21(t−11−t+11). Simplify using logarithm rules after integrating.
View Solution
Solution to question 1:
Separate: y2−1dy=x2−1dx. Apply partial fractions to each side:
21lny+1y−1=21lnx+1x−1+C1
Multiply by 2 and exponentiate:
y+1y−1=Kx+1x−1,K>0Solution to question 2:
If y=x, then y+1y−1=x+1x−1, so K=1. This is indeed a member of the general family. Direct substitution confirms dxdy=1=x2−1x2−1=1. ✓
First-Order Linear Differential Equations and Integrating Factors
A first-order linear ODE has the standard form dxdy+P(x)y=Q(x). The key technique is to multiply through by the integrating factorμ(x)=e∫P(x)dx, which transforms the left side into an exact derivative. These equations model phenomena such as mixing problems, Newton’s law of cooling, and population growth with harvesting.
Problem 5: Standard Integrating Factor
Easy
Solve the differential equation dxdy+x2y=x3 for x>0.
Identify P(x) and compute the integrating factor μ(x).
Find the general solution.
Hint
With P(x)=2/x, the integrating factor is μ=e∫(2/x)dx=x2. Multiply the entire equation by x2 and recognize the left side as dxd[x2y].
View Solution
Solution to question 1:
P(x)=x2, so μ(x)=e2lnx=x2.
Solution to question 2:
Multiply through:
dxd[x2y]=x5
Integrate both sides:
x2y=6x6+Cy=6x4+x2C
Problem 6: Initial Value Problem with Exponential Forcing
Easy
Solve the initial value problem y′−3y=e5x,y(0)=1.
Find the general solution using an integrating factor.
Apply the initial condition to find the particular solution.
Hint
Here P(x)=−3, so μ=e−3x. After multiplying through, the right side becomes e5x⋅e−3x=e2x, which integrates easily.
View Solution
Solution to question 1:
Multiply by e−3x:
dxd[e−3xy]=e2x
Integrate:
e−3xy=2e2x+C⟹y=2e5x+Ce3xSolution to question 2:
At x=0: 1=21+C⟹C=21.
y=2e5x+e3x
Problem 7: Mixing Tank Problem
Medium
A tank initially contains 100 L of pure water. A salt solution with concentration 0.5 kg/L flows in at 4 L/min, and the well-mixed solution drains out at the same rate.
Set up the differential equation for Q(t), the amount of salt (in kg) in the tank at time t (in minutes).
Solve the IVP and find the limiting amount of salt in the tank as t→∞.
Hint
Rate in = (concentration in) × (flow rate in). Rate out = (concentration out) × (flow rate out), where concentration out = Q(t)/100. Write Q′=rate in−rate out and bring it to standard linear form.
View Solution
Solution to question 1:Q′=(0.5)(4)−100Q(4)=2−25Q
Standard form: Q′+25Q=2, Q(0)=0.
Solution to question 2:
Integrating factor μ=et/25:
dtd[et/25Q]=2et/25Q=50+Ce−t/25
Apply Q(0)=0: C=−50.
Q(t)=50(1−e−t/25)
As t→∞, Q→50 kg, which equals the steady-state: 100 L × 0.5 kg/L.
Problem 8: Bernoulli Equation
Hard
Solve the Bernoulli equation dxdy+xy=x2y3.
Apply the substitution v=y1−3=y−2 to reduce the equation to a linear ODE in v.
Solve for v(x), then recover y(x).
Hint
Divide the equation by y3 first, so you have y−3y′+xy−2=x2. Then set v=y−2 and compute v′=−2y−3y′. Substituting converts the equation into a first-order linear ODE in v that you can solve with an integrating factor.
View Solution
Solution to question 1:
Divide by y3:
y−3y′+xy−2=x2
Let v=y−2, so v′=−2y−3y′, giving y−3y′=−v′/2:
−2v′+xv=x2⟹v′−x2v=−2x2Solution to question 2:
Integrating factor: μ=x−2. Then:
dxd[x2v]=−2⟹x2v=−2x+Cv=−2x3+Cx2
Recover y from v=y−2:
y=Cx2−2x31
Second-Order Homogeneous Linear Differential Equations
A second-order homogeneous linear ODE with constant coefficients has the form ay′′+by′+cy=0. Its general solution is built from the roots of the characteristic equationar2+br+c=0. The nature of those roots, distinct real, repeated real, or complex conjugate,determines the form of the general solution. Mastering these three cases is essential before moving to nonhomogeneous equations.
Problem 9: Distinct Real Roots
Easy
Solve the differential equation y′′−5y′+6y=0.
Write and solve the characteristic equation.
State the general solution and find the particular solution with y(0)=2, y′(0)=5.
Hint
Substitute y=erx and factor the resulting quadratic. With two distinct real roots r1 and r2, the general solution is y=c1er1x+c2er2x. Differentiate once to use both initial conditions.
View Solution
Solution to question 1:
Characteristic equation: r2−5r+6=(r−2)(r−3)=0, so r1=2,r2=3.
Solution to question 2:y=c1e2x+c2e3x,y′=2c1e2x+3c2e3x
At x=0: c1+c2=2 and 2c1+3c2=5. Solving: c1=1,c2=1.
y=e2x+e3x
Problem 10: Repeated Root Case
Easy
Solve the IVP y′′+4y′+4y=0,y(0)=3,y′(0)=−1.
Find the repeated root and write the general solution.
Apply the initial conditions.
Hint
The characteristic equation factors as a perfect square. When the characteristic equation yields a repeated root r=α, the two linearly independent solutions are eαx and xeαx.
View Solution
Solution to question 1:
Characteristic equation: r2+4r+4=(r+2)2=0, so r=−2 (repeated).
y=(c1+c2x)e−2xSolution to question 2:
Differentiate: y′=c2e−2x−2(c1+c2x)e−2x.
At x=0: c1=3 and c2−2c1=−1⟹c2=5.
y=(3+5x)e−2x
Problem 11: Complex Conjugate Roots
Medium
Solve the IVP y′′−2y′+5y=0,y(0)=0,y′(0)=4.
Find the complex roots and write the general real-valued solution using sine and cosine.
Apply the initial conditions to determine the particular solution.
Hint
The discriminant is negative, so the roots are complex: r=α±βi. Use Euler’s formula to write the general solution as y=eαx(c1cosβx+c2sinβx).
r=22±4i=1±2iy=ex(c1cos2x+c2sin2x)Solution to question 2:
At x=0: y(0)=c1=0.
Differentiate with c1=0: y′=ex(c2sin2x)⋅1+ex(2c2cos2x). At x=0: y′(0)=2c2=4⟹c2=2.
y=2exsin2x
Problem 12: Constructing an Equation from Known Solutions
Medium
Two functions are given: y1=e−xcos3x and y2=e−xsin3x.
Identify the complex roots from which these solutions arise and reconstruct the characteristic equation.
Write the second-order homogeneous ODE with constant coefficients having these as a fundamental set of solutions, and compute the Wronskian W(y1,y2).
Hint
From eαxcosβx and eαxsinβx, read off α=−1 and β=3. The roots are r=−1±3i. Reconstruct the characteristic polynomial as (r−(−1+3i))(r−(−1−3i)). For the Wronskian, use W=y1y2′−y2y1′.
View Solution
Solution to question 1:
Roots: r=−1±3i. Characteristic polynomial:
(r+1)2+9=r2+2r+10=0Solution to question 2:
The ODE is y′′+2y′+10y=0.
Wronskian:
W=y1y2′−y2y1′
By Abel’s theorem, W(x)=W(0)e−∫0x2dt=W(0)e−2x. Computing W(0)=(1)(3)−(0)(−1)=3:
W(y1,y2)=3e−2x=0
Since W=0, the set {y1,y2} is indeed a fundamental set of solutions.
Nonhomogeneous Equations: Method of Undetermined Coefficients
When the right-hand side of ay′′+by′+cy=f(x) consists of polynomials, exponentials, sines, cosines, or their products, the method of undetermined coefficients offers an efficient path to finding a particular solutionyp. The general solution is then y=yh+yp, where yh is the homogeneous solution. The key step is recognizing when the trial function overlaps with part of yh, requiring multiplication by x to avoid redundancy.
Problem 13: Polynomial Forcing Function
Easy
Find the general solution of y′′+3y′+2y=4x+1.
Solve the associated homogeneous equation.
Guess a particular solution of the form yp=Ax+B and determine A and B.
Hint
For a polynomial forcing term of degree 1, guess yp=Ax+B. Substitute yp, yp′, and yp′′ into the ODE and match coefficients of equal powers of x on both sides.
View Solution
Solution to question 1:
Characteristic equation: r2+3r+2=(r+1)(r+2)=0, so r=−1,−2.
yh=c1e−x+c2e−2xSolution to question 2:
With yp=Ax+B, we have yp′=A, yp′′=0. Substituting:
0+3A+2(Ax+B)=4x+1⟹2Ax+(3A+2B)=4x+1
Matching: A=2 and 3(2)+2B=1⟹B=−25.
y=c1e−x+c2e−2x+2x−25
Problem 14: Resonance (Repeated Trial Function)
Medium
Find the general solution of y′′−4y′+4y=3e2x.
Solve the homogeneous equation and explain why the naive trial yp=Ae2x fails.
Use the modified trial yp=Ax2e2x to find the particular solution.
Hint
The homogeneous solution contains e2x and xe2x (repeated root r=2). Because both overlap with Ae2x and Axe2x, the trial function must be multiplied by x2 to avoid redundancy. Compute yp′ and yp′′ carefully using the product rule.
View Solution
Solution to question 1:
Characteristic equation: (r−2)2=0, so yh=(c1+c2x)e2x. Both e2x and xe2x are already in yh, so Ae2x and Axe2x yield zero when substituted.
Solution to question 2:
Let yp=Ax2e2x. Then:
yp′=A(2x+2x2)e2x,yp′′=A(2+8x+4x2)e2x
Substitute into y′′−4y′+4y:
A(2+8x+4x2)e2x−4A(2x+2x2)e2x+4Ax2e2x=2Ae2x=3e2x
So A=23.
y=(c1+c2x)e2x+23x2e2x
Problem 15: Sinusoidal Forcing and IVP
Hard
Solve the IVP y′′+9y=2sin3x,y(0)=0,y′(0)=0.
Note why a naive trial yp=Acos3x+Bsin3x leads to resonance and state the correct trial function.
Find the complete particular and general solution, then apply the initial conditions.
Hint
The homogeneous solution is c1cos3x+c2sin3x, so the forcing frequency matches the natural frequency. Multiply the trial by x: guess yp=x(Acos3x+Bsin3x). After computing derivatives, collect like terms and match coefficients.
View Solution
Solution to question 1:
The homogeneous solution is yh=c1cos3x+c2sin3x. The forcing term sin3x duplicates part of yh, so we use yp=x(Acos3x+Bsin3x).
Solution to question 2:
Computing yp′′ and substituting into y′′+9y yields −6Asin3x+6Bcos3x=2sin3x. Matching:
−6A=2⟹A=−31,6B=0⟹B=0yp=−3xcos3x
General solution: y=c1cos3x+c2sin3x−3xcos3x.
Apply y(0)=0: c1=0. Differentiate and apply y′(0)=0: 3c2−31=0⟹c2=91.
y=9sin3x−3xcos3x
Variation of Parameters
The method of variation of parameters finds a particular solution yp=u1(x)y1+u2(x)y2 for any nonhomogeneous linear ODE y′′+P(x)y′+Q(x)y=f(x), provided a fundamental set of solutions {y1,y2} of the homogeneous equation is known. Unlike undetermined coefficients, this method imposes no restrictions on the form of f(x). The formulas are u1′=−y2f/W and u2′=y1f/W, where W is the Wronskian.
Problem 16: Variation of Parameters (Exponential Forcing)
Medium
Use variation of parameters to find a particular solution of y′′−y=ex.
Identify y1, y2, and compute the Wronskian.
Find u1 and u2, then write yp.
Hint
The homogeneous equation y′′−y=0 has characteristic roots r=±1, giving y1=ex and y2=e−x. Here f(x)=ex. One of the integrals ∫u1′dx will need to be handled carefully because y1=ex and f(x)=ex have the same exponential.
View Solution
Solution to question 1:W=ex(−e−x)−e−x(ex)=−1−1=−2Solution to question 2:u1′=−Wy2f=−−2e−x⋅ex=21⟹u1=2xu2′=Wy1f=−2ex⋅ex=−2e2x⟹u2=−4e2xyp=2xex−4e2xe−x=2xex−4ex
The term −4ex is part of yh, so the essential particular solution is:
yp=2xex
Problem 17: Variation of Parameters (Trigonometric Forcing)
Medium
Find the general solution of y′′+y=secx on −π/2<x<π/2.
State the homogeneous solution and set up the variation of parameters formulas.
Evaluate the necessary integrals and write the complete general solution.
Hint
Here y1=cosx, y2=sinx, and W=1. The forcing function f=secx cannot be handled by undetermined coefficients, which makes this a natural candidate for variation of parameters. You will need ∫sinxsecxdx and ∫cosxsecxdx.
View Solution
Solution to question 1:
yh=c1cosx+c2sinx, W=cos2x+sin2x=1.
u1′=−1sinx⋅secx=−tanx,u2′=1cosx⋅secx=1Solution to question 2:u1=ln∣cosx∣,u2=xyp=cosxln(cosx)+xsinxy=c1cosx+c2sinx+cosxln(cosx)+xsinx
Problem 18: Variation of Parameters with Non-Constant Coefficients (Euler Equation)
Hard
Consider the Euler (Cauchy–Euler) equationx2y′′−2xy′+2y=x3lnx for x>0.
Verify that y1=x and y2=x2 are solutions of the associated homogeneous equation x2y′′−2xy′+2y=0 and compute their Wronskian.
Rewrite the equation in standard form and apply variation of parameters to find the general solution.
Hint
To bring the equation to standard form y′′+Py′+Qy=f, divide through by x2. The forcing term in standard form is f(x)=xlnx. With W=x2, compute u1′=−y2f/W and u2′=y1f/W, then integrate by parts.
View Solution
Solution to question 1:
For y1=x: y1′′=0, so x2(0)−2x(1)+2x=0. ✓
For y2=x2: y2′′=2, so x2(2)−2x(2x)+2x2=2x2−4x2+2x2=0. ✓
Differential equations model a wide range of real-world phenomena. This section presents applied problems drawn from exponential growth and decay, Newton’s law of cooling, and mechanical vibrations (spring-mass systems). Setting up the governing ODE from a physical description is itself a critical skill, tested frequently in engineering and applied mathematics courses.
Problem 19: Radioactive Decay and Half-Life
Easy
A radioactive substance decays at a rate proportional to the amount present. The half-life of the substance is 8 years.
Write and solve the governing differential equation for A(t), the amount remaining at time t.
If the initial amount is 200 g, how much remains after 20 years? Give an exact answer and a decimal approximation.
Hint
The governing equation is A′=kA with k<0. Use the half-life condition A(8)=A0/2 to determine k=−ln2/8.
View Solution
Solution to question 1:A′=kA⟹A(t)=A0ekt
From A(8)=A0/2: e8k=1/2⟹k=−8ln2.
A(t)=A0e−(ln2/8)t=A0⋅2−t/8Solution to question 2:A(20)=200⋅2−20/8=200⋅2−5/2=42200=250=252≈35.36 gA(20)=252≈35.4 g
Problem 20: Newton’s Law of Cooling
Medium
A cup of coffee at 90°C is placed in a room maintained at 20°C. After 10 minutes, the coffee has cooled to 70°C.
Set up and solve the IVP for the temperature T(t) using Newton’s law of cooling.
Find the time at which the coffee reaches 40°C.
Hint
Newton’s law of cooling: dtdT=k(T−Troom). Let u=T−20 to get a simpler separable equation. After solving, use T(10)=70 to find k, then solve T(t∗)=40 for t∗.
View Solution
Solution to question 1:
Let u=T−20. Then u′=ku, so u=u0ekt. At t=0: u0=70. Thus T=20+70ekt.
A mass of 1 kg is attached to a spring with spring constant k=13 N/m. The system experiences damping with coefficient c=4 N·s/m. At t=0 the mass is displaced 0.5 m from equilibrium and released from rest.
Write the IVP governing the displacement x(t) and classify the damping type.
Solve the IVP completely and describe the long-term behavior of the solution.
Hint
Newton’s second law gives mx′′+cx′+kx=0. With m=1, c=4, k=13, compute the discriminant c2−4mk to classify damping. A negative discriminant indicates underdamping, leading to complex roots and oscillatory decay.
View Solution
Solution to question 1:
The IVP is x′′+4x′+13x=0,x(0)=0.5,x′(0)=0.
Discriminant: 42−4(1)(13)=16−52=−36<0. The system is underdamped.
Solution to question 2:
Characteristic roots: r=2−4±6i=−2±3i.
x(t)=e−2t(c1cos3t+c2sin3t)
Apply x(0)=0.5: c1=0.5.
Apply x′(0)=0: x′(0)=−2c1+3c2=0⟹c2=31.
x(t)=e−2t(21cos3t+31sin3t)
As t→∞, the factor e−2t→0, so the displacement decays to zero. The solution oscillates with pseudo-period 32π seconds while the amplitude shrinks exponentially, the hallmark of underdamped oscillation.