Open In App

Solution of Differential Equation

Last Updated : 23 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

A differential equation is a mathematical equation that relates a function to its derivatives, describing how a rate of change in one variable depends on the values of other variables. There are two main types of differential equations: Ordinary Differential Equations (ODEs), which involve functions of a single variable and their derivatives, and Partial Differential Equations (PDEs), which involve functions of multiple variables and their partial derivatives. Solving these equations means finding functions that satisfy the given relationships.

The solutions can be explicit functions, implicit forms, or numerical approximations, depending on the equation's complexity.

What is a Differential Equation?

A mathematical equation that connects a function to its derivatives is called a differential equation. These formulas can explain a broad variety of phenomena including the object motion and electrical circuit behavior. In many disciplines including physics, engineering, biology and economics they are indispensable tools.

The Differential equations can be classified based on the type of the derivatives involved:

How to Find the Solution of Differential Equations?

To find the solution of differential equations, we can use the following methods:

  • Separation of Variables
  • Integrating Factor Method
  • Homogeneous Equations
  • Exact Differential Equations
  • Numerical Methods

Separation of Variables

Separation of Variables is a method used to solve differential equations. It involves rewriting the differential equation in a form where the variables can be separated, allowing integration to be performed on each side independently.

This method is applicable to the separable equations where the equation can be written in the form:

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

The variables can be separated and integrated to the find the solution.

Read More about Separation of Variables.

Integrating Factor Method

Used for the first-order linear ODEs of the form:

\frac{dy}{dx} + P(x)y = Q(x)

The integrating factor is given by:

\mu(x) = e^{\int P(x)dx}

Homogeneous Equations

For homogeneous equations the equation can be rewritten by the substituting:

v = \frac{y}{x} reducing it to the separable form.

Exact Differential Equations

An equation of the form:

M(x, y) dx + N(x, y) dy = 0

is exact if:

\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}

The solution is obtained by the integrating the M with the respect to the x and N with the respect to y.

Read More about Exact Differential Equations.

Numerical Methods

Numerical methods are essential for solving differential equations that cannot be solved analytically. These methods approximate the solutions using numerical techniques and are particularly useful for complex problems or those involving real-world data. Some of the common methods are:

  • Euler's Method
  • Runge-Kutta Method
  • Backward Euler Method
  • Finite Difference Method

General Solution of Differential Equations

The general solution of the differential equation encompasses all possible solutions and involves the arbitrary constants.

Type of Differential EquationForm of the EquationGeneral Solution
First-order lineardy/dx + P(x)y = Q(x)y = e^{-\int P(x) dx} \left( \int e^{\int P(x) dx} Q(x) dx + C \right)
Separabledy/dx = g(x)h(y)\int \frac{1}{h(y)} dy = \int g(x) dx + C
Homogeneous (First-order)dy/dx = f(y/x)Use substitution y = vx, convert to a separable equation
Exact equationM(x, y)dx + N(x, y)dy = 0Verify exactness: \frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}​, solve ψ(x, y) = C
Second-order linear homogeneous with constant coefficientsad2y/dx2 + bdy/dx + cy = 0Characteristic equation: ar2 + br + c = 0, solve for r, solution depends on roots (real/complex/repeated)
Second-order linear non-homogeneous

a \frac{d^2y}{dx^2} + b \frac{dy}{dx} + cy = g(x)

General solution = complementary function (solve homogeneous equation) + particular solution (method of undetermined coefficients/variation of parameters)
Bernoulli equationdy/dx + P(x)y = Q(x)ynUse substitution z = y1−n, solve resulting linear equation
Cauchy-Euler equationx2d2y/dx2 + axdy/dx + by = 0Characteristic equation: r(r − 1) + ar + b = 0, solve for r, solution depends on roots
Non-linear (Exact equation with integrating factor)M(x, y)dx + N(x, y)dy = 0Multiply by integrating factor μ(x, y), convert to exact equation and solve
Systems of linear differential equationsX′ = AXSolution involves diagonalization of matrix A, X(t) = eAtC, where eAte^{At}eAt is the matrix exponential and C is constant

Applications of Differential Equations

The Differential equations are widely used in the various fields such as the physics, engineering, biology and more. For example:

  • Physics: The Modeling the motion of the objects, heat conduction and wave propagation.
  • Biology: The Modeling population dynamics, spread of the diseases and chemical reactions.
  • Engineering: The Analyzing the electrical circuits, control systems and mechanical vibrations.

Solved Examples on Differential Equation

Example 1: Solve the differential equation: \frac{dy}{dx} = xy

Solution:

Separate the variables:

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

Integrate both sides:

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

Exponentiate both sides:

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

So, the solution is:

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

Example 2: Solve the differential equation:\frac{dy}{dx} = \frac{x+y}{x-y}

Solution:

Substitute v = \frac{y}{x} so y = vx and \frac{dy}{dx} = v + x\frac{dv}{dx} :

v + x\frac{dv}{dx} = \frac{1+v}{1-v}

Separate variables:

(1-v^2) dv = \frac{dx}{x}

Integrate both the sides:

\frac{1}{2} \ln \left|\frac{1+v}{1-v}\right| = \ln|x| + C

Exponentiate:

\left(\frac{1+v}{1-v}\right)^{\frac{1}{2}} = Cx

Finally, substituting v = \frac{y}{x}:

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

Example 3: Solve the exact differential equation: (2xy + y2) dx + (x2 + 2xy) dy = 0

Solution:

Check for exactness:

\frac{\partial M}{\partial y} = 2x + 2y \quad \text{and} \quad \frac{\partial N}{\partial x} = 2x + 2y

Since \frac{\partial M}{\partial y} = \frac{\partial N}{\partial x} the equation is exact.

Integrate M with the respect to x:

\int (2xy + y^2) \, dx = x^2 y + xy^2 + g(y)

Differentiate with the respect to y and compare with the N:

\frac{\partial}{\partial y}(x^2 y + xy^2 + g(y)) = x^2 + 2xy + g'(y)

So, g'(y) = 0 meaning g(y) is a constant. The solution is:

x 2y+xy 2=C

Example 4: Solve the differential equation: \frac{dy}{dx} + \frac{2y}{x} = x^2

Solution:

This is a first-order linear equation. The integrating factor is:

\mu(x) = e^{\int \frac{2}{x} \, dx} = x^2

The Multiply the entire equation by the x^2:

x^2 \frac{dy}{dx} + 2xy = x^4

This simplifies to:

\frac{d}{dx}(x^2 y) = x^4

The Integrate both sides:

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

So, the solution is:

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

Example 5: Solve the second-order linear differential equation: y'' - 4y' + 4y = 0

Solution:

The characteristic equation is:

r2 - 4r + 4 = 0

This factors as:

(r - 2)2= 0

So, r = 2 is a repeated root. The general solution is:

y(x) = (C_1 + C_2 x) e^{2x}

Practical Questions

Questions 1. Solve the differential equation \frac{dy}{dx} = 3y using the separation of variables method.

Questions 2. Find the general solution of the first-order linear differential equation \frac{dy}{dx} + y = e^x .

Questions 3. Solve the homogeneous differential equation \frac{dy}{dx} = \frac{x+y}{x-y}.

Questions 4. Solve the exact differential equation (x + y) \, dx + (x - y) \, dy = 0 .

Questions 5. Solve the second-order differential equation y'' + 3y' + 2y = 0.

Questions 6. Use the integrating factor method to solve \frac{dy}{dx} - \frac{y}{x} = x^2.

Questions 7. Solve the first-order nonlinear differential equation y' = y^2 \sin(x).

Questions 8. Determine the solution to the differential equation \frac{d^2y}{dx^2} + 4 \frac{dy}{dx} + 4y = 0 .

Questions 9. Solve the linear differential equation \frac{dy}{dx} + y \cot(x) = \csc(x).

Questions 10. Solve the exact differential equation (2xy - y2) dx + (x2 - 2xy)dy = 0.

Read More,

Conclusion

Understanding how to solve differential equations is essential for the analyzing the various physical and mathematical problems. This article has provided an overview of the key methods for the solving differential equations along with the solved problems and FAQs to reinforce the concepts.


Similar Reads