Solution of Differential Equation
Last Updated :
23 Jul, 2025
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 Equation | Form of the Equation | General Solution |
---|
First-order linear | dy/dx + P(x)y = Q(x) | y = e^{-\int P(x) dx} \left( \int e^{\int P(x) dx} Q(x) dx + C \right) |
Separable | dy/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 equation | M(x, y)dx + N(x, y)dy = 0 | Verify exactness: \frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}, solve ψ(x, y) = C |
Second-order linear homogeneous with constant coefficients | ad2y/dx2 + bdy/dx + cy = 0 | Characteristic 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 equation | dy/dx + P(x)y = Q(x)yn | Use substitution z = y1−n, solve resulting linear equation |
Cauchy-Euler equation | x2d2y/dx2 + axdy/dx + by = 0 | Characteristic 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 = 0 | Multiply by integrating factor μ(x, y), convert to exact equation and solve |
Systems of linear differential equations | X′ = AX | Solution 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
Engineering Mathematics Tutorials Engineering mathematics is a vital component of the engineering discipline, offering the analytical tools and techniques necessary for solving complex problems across various fields. Whether you're designing a bridge, optimizing a manufacturing process, or developing algorithms for computer systems,
3 min read
Linear Algebra
MatricesMatrices are key concepts in mathematics, widely used in solving equations and problems in fields like physics and computer science. A matrix is simply a grid of numbers, and a determinant is a value calculated from a square matrix.Example: \begin{bmatrix} 6 & 9 \\ 5 & -4 \\ \end{bmatrix}_{2
3 min read
Row Echelon FormRow Echelon Form (REF) of a matrix simplifies solving systems of linear equations, understanding linear transformations, and working with matrix equations. A matrix is in Row Echelon form if it has the following properties:Zero Rows at the Bottom: If there are any rows that are completely filled wit
4 min read
Eigenvalues and EigenvectorsEigenvalues and eigenvectors are fundamental concepts in linear algebra, used in various applications such as matrix diagonalization, stability analysis and data analysis (e.g., PCA). They are associated with a square matrix and provide insights into its properties.Eigen value and Eigen vectorTable
10 min read
System of Linear EquationsA system of linear equations is a set of two or more linear equations involving the same variables. Each equation represents a straight line or a plane and the solution to the system is the set of values for the variables that satisfy all equations simultaneously.Here is simple example of system of
5 min read
Matrix DiagonalizationMatrix diagonalization is the process of reducing a square matrix into its diagonal form using a similarity transformation. This process is useful because diagonal matrices are easier to work with, especially when raising them to integer powers.Not all matrices are diagonalizable. A matrix is diagon
8 min read
LU DecompositionLU decomposition or factorization of a matrix is the factorization of a given square matrix into two triangular matrices, one upper triangular matrix and one lower triangular matrix, such that the product of these two matrices gives the original matrix. It is a fundamental technique in linear algebr
6 min read
Finding Inverse of a Square Matrix using Cayley Hamilton Theorem in MATLABMatrix is the set of numbers arranged in rows & columns in order to form a Rectangular array. Here, those numbers are called the entries or elements of that matrix. A Rectangular array of (m*n) numbers in the form of 'm' horizontal lines (rows) & 'n' vertical lines (called columns), is calle
4 min read
Sequence & Series
Calculus
Limits, Continuity and DifferentiabilityLimits, Continuity, and Differentiation are fundamental concepts in calculus. They are essential for analyzing and understanding function behavior and are crucial for solving real-world problems in physics, engineering, and economics.Table of ContentLimitsKey Characteristics of LimitsExample of Limi
10 min read
Cauchy's Mean Value TheoremCauchy's Mean Value theorem provides a relation between the change of two functions over a fixed interval with their derivative. It is a special case of Lagrange Mean Value Theorem. Cauchy's Mean Value theorem is also called the Extended Mean Value Theorem or the Second Mean Value Theorem.According
7 min read
Taylor SeriesA Taylor series represents a function as an infinite sum of terms, calculated from the values of its derivatives at a single point.Taylor series is a powerful mathematical tool used to approximate complex functions with an infinite sum of terms derived from the function's derivatives at a single poi
8 min read
Inverse functions and composition of functionsInverse Functions - In mathematics a function, a, is said to be an inverse of another, b, if given the output of b a returns the input value given to b. Additionally, this must hold true for every element in the domain co-domain(range) of b. In other words, assuming x and y are constants, if b(x) =
3 min read
Definite Integral | Definition, Formula & How to CalculateA definite integral is an integral that calculates a fixed value for the area under a curve between two specified limits. The resulting value represents the sum of all infinitesimal quantities within these boundaries. i.e. if we integrate any function within a fixed interval it is called a Definite
8 min read
Application of Derivative - Maxima and MinimaDerivatives have many applications, like finding rate of change, approximation, maxima/minima and tangent. In this section, we focus on their use in finding maxima and minima.Note: If f(x) is a continuous function, then for every continuous function on a closed interval has a maximum and a minimum v
6 min read
Probability & Statistics
Mean, Variance and Standard DeviationMean, Variance and Standard Deviation are fundamental concepts in statistics and engineering mathematics, essential for analyzing and interpreting data. These measures provide insights into data's central tendency, dispersion, and spread, which are crucial for making informed decisions in various en
10 min read
Conditional ProbabilityConditional probability defines the probability of an event occurring based on a given condition or prior knowledge of another event. It is the likelihood of an event occurring, given that another event has already occurred. In probability, this is denoted as A given B, expressed as P(A | B), indica
12 min read
Bayes' TheoremBayes' Theorem is a mathematical formula used to determine the conditional probability of an event based on prior knowledge and new evidence. It adjusts probabilities when new information comes in and helps make better decisions in uncertain situations.Bayes' Theorem helps us update probabilities ba
13 min read
Probability Distribution - Function, Formula, TableA probability distribution is a mathematical function or rule that describes how the probabilities of different outcomes are assigned to the possible values of a random variable. It provides a way of modeling the likelihood of each outcome in a random experiment.While a Frequency Distribution shows
13 min read
Covariance and CorrelationCovariance and correlation are the two key concepts in Statistics that help us analyze the relationship between two variables. Covariance measures how two variables change together, indicating whether they move in the same or opposite directions. Relationship between Independent and dependent variab
6 min read
Practice Questions