📘 CodingMarble Learn

Differential Equations

A differential equation connects a function y with its derivatives. Its order is the highest derivative present and its degree is the power of that derivative (when the equation is a polynomial in derivatives). A general solution has arbitrary constants; a condition like y(0) = 1 fixes them to give a particular solution. Class 12 solves first-order equations of three kinds: variables separable, homogeneous (put y = vx) and linear dy/dx + Py = Q (multiply by the integrating factor e^∫P dx).

🎬 Step-by-step story

  1. A differential equation links y with its derivatives. Each little line shows the slope dy/dx at that point. Order is the highest derivative; degree is its power.
  2. dy/dx = y has the general solution y = Ceˣ: a whole family of curves. The condition y(0) = 1 picks one particular solution, y = eˣ.
  3. Separation of variables: dy/dx = −x/y. Put all y terms with dy on one side and x terms with dx on the other, integrate both, and get circles.
  4. Homogeneous equation: dy/dx = (x + y)/x. Put y = vx; then the variables separate and we can integrate.
  5. Linear equation: dy/dx + y = x. Multiply by the integrating factor eˣ so the left side becomes the derivative of y·eˣ.
  6. Your turn: pick an equation, slide the starting value y(0), and watch the solution curve follow the arrows.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

What do the little lines in the 3D mean?

Each tiny line has the slope dy/dx that the equation gives at that point. A solution curve must be tangent to every line it passes.

Why is the degree sometimes not defined?

Degree is the power of the highest derivative in polynomial form. If a derivative sits inside sin, e^ or log, there is no such power, so the degree is not defined.

Why does the general solution have a C?

We integrate once for a first-order equation, and each integration brings a constant. Different C values give the grey family of curves.

Why do the curves become circles for dy/dx = −x/y?

The slope −x/y is always perpendicular to the line from the origin, so the path keeps going around the origin at the same distance: a circle.

How do I know an equation is homogeneous?

Replace x by λx and y by λy. If F stays exactly the same, it is homogeneous and y = vx will work.

Why does multiplying by eˣ help?

eˣ(dy/dx + y) is exactly d/dx(y eˣ). So the left side becomes one derivative and we can integrate straight away.

Why does every solution of dy/dx + y = x approach y = x − 1?

The part Ce⁻ˣ shrinks to 0 as x grows, leaving y = x − 1. In free play, choose dy/dx = x − y and try different y(0).

What is a differential equation? Order and degree

A differential equation contains an unknown function y and one or more of its derivatives, like dy/dx = 2x or y″ + y = 0.

Order = the highest derivative that appears. Degree = the power of that highest derivative, after the equation is made free of radicals and fractions in the derivatives. The degree is defined only if the equation is a polynomial in the derivatives.

General and particular solutions

A solution is a function that makes the equation true. The general solution has as many arbitrary constants as the order, e.g. y = Ceˣ for dy/dx = y. A particular solution has no arbitrary constants; we find them from given conditions like y(0) = 1, giving y = eˣ.

To check a solution, substitute it (and its derivatives) into the equation.

Variables separable

If dy/dx = g(x)·h(y), write dy/h(y) = g(x) dx and integrate both sides:

∫dy/h(y) = ∫g(x) dx + C.

Example: dy/dx = −x/y → y dy = −x dx → y²/2 = −x²/2 + c → x² + y² = C (a family of circles).

Homogeneous differential equations

F(x, y) is homogeneous of degree 0 if F(λx, λy) = F(x, y); then dy/dx = F(x, y) can be written as a function of y/x.

  1. Put y = vx, so dy/dx = v + x dv/dx.
  2. Substitute and simplify; x and v now separate.
  3. Integrate, then put back v = y/x.

If the equation looks like dx/dy = G(x/y), use x = vy instead.

Linear first-order differential equations

Form: dy/dx + P(x) y = Q(x).

  1. Integrating factor: I.F. = e^∫P dx.
  2. Solution: y × I.F. = ∫(Q × I.F.) dx + C.

Example: dy/dx + y = x. I.F. = eˣ. y eˣ = ∫x eˣ dx = eˣ(x − 1) + C → y = x − 1 + Ce⁻ˣ.

For dx/dy + P₁(y) x = Q₁(y), swap roles: I.F. = e^∫P₁ dy and x × I.F. = ∫(Q₁ × I.F.) dy + C.

Key formulas and definitions

Worked examples

1. Find the order and degree of (d²y/dx²)² + 3(dy/dx)³ + y = 0.

Highest derivative d²y/dx², so order 2. Its power is 2, so degree 2.

2. Show that y = Ae²ˣ is a solution of dy/dx = 2y.

dy/dx = 2Ae²ˣ = 2y. It satisfies the equation, so it is a solution (general, since it has one constant).

3. Solve dy/dx = (1 + y²)/(1 + x²).

dy/(1 + y²) = dx/(1 + x²). tan⁻¹y = tan⁻¹x + C.

4. Solve dy/dx = e^(x − y), given y(0) = 0.

eʸ dy = eˣ dx → eʸ = eˣ + C. y(0) = 0: 1 = 1 + C → C = 0. So eʸ = eˣ, i.e. y = x.

5. Solve the homogeneous equation dy/dx = (x + y)/x.

y = vx: v + x dv/dx = 1 + v → x dv/dx = 1 → v = ln|x| + C → y = x ln|x| + Cx.

6. Solve the homogeneous equation dy/dx = (x² + y²)/(2xy).

y = vx: v + x dv/dx = (1 + v²)/(2v) → x dv/dx = (1 − v²)/(2v) → 2v dv/(1 − v²) = dx/x → −ln|1 − v²| = ln|x| + c → x(1 − v²) = C → x² − y² = Cx.

7. Solve dy/dx + 2y = e⁻ˣ.

P = 2, I.F. = e²ˣ. y e²ˣ = ∫e⁻ˣ e²ˣ dx = eˣ + C. y = e⁻ˣ + Ce⁻²ˣ.

8. Solve dy/dx + y/x = x² (x > 0), given y(1) = 1.

I.F. = e^∫(1/x)dx = x. xy = ∫x³ dx = x⁴/4 + C. y(1) = 1: 1 = 1/4 + C → C = 3/4. y = x³/4 + 3/(4x).

Common mistakes

Practice quiz

1. Order of d³y/dx³ + (dy/dx)² = 0 is:
2. Number of arbitrary constants in the general solution of a 2nd-order equation:
3. I.F. of dy/dx + 3y = x is:
4. For a homogeneous equation we substitute:
5. The solution of dy/dx = y with y(0) = 2 is:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What types of differential equations are in Class 12?

First order, first degree equations: variables separable, homogeneous and linear, plus order, degree, general and particular solutions.

What is an integrating factor?

For dy/dx + Py = Q, it is e^∫P dx. Multiplying by it turns the left side into d/dx(y × I.F.).

What is the difference between general and particular solution?

The general solution has arbitrary constants and describes a family of curves; the particular solution uses given conditions to fix them.

Where this is taught

ItalySecondaria di secondo grado – classe 5ª (esame di Stato)Relations and functions
NetherlandsVWO 6 (eindexamenjaar)Dynamical systems (part 2)
CBSE (India)Class 12Calculus
CBSE (India)Class 12Calculus
England (GCSE, A level)Year 13I Differential equations
USA (Common Core, NGSS, AP)Grade 12Differential Equations
USA (Common Core, NGSS, AP)Grade 12Differential Equations
FranceTerminaleAnalysis
FranceTerminaleMathematics
FranceTerminaleMathematics
Russia11 классElements of calculus

Learn first

Related lessons

All Maths lessons