First Order Differential Equation

A first-order differential equation is defined by an equation


of two variables x and y with its function f(x,y) defined on a region in the xy-plane. It has only the first derivative \(\frac{dy}{dx}\) ,so that the equation is of first order and not higher-order derivatives.

The above first order differential equation can also be written as

\(y{}’=f(x,y)\) or


First Order Linear Differential Equation

If the function f is a linear expression in y,then the first order differential equation \(y{}’= f(x,y)\) is a linear equation. That is, the equation is linear and the function f takes the form


Since the linear function is y = mx+b

where p and q are continuous functions on some interval I. Differential equations that are not linear are called nonlinear equations.

Consider the first order differential equation \(y{}’= f(x,y)\) is a linear equation and it can be written in the form

\(y{}’+a(x)y= f(x)\)

where a(x) and f(x) are continuous functions of x

There are two methods involved in solving linear differential equation. They are

  • Using an integrating factor
  • Method of variation of a constant

Method 1 : Using an Integrating Factor

If a linear differential equation is written in the standard form:


Then, the integrating factor is defined by the formula

\(u(x)=exp(\int a(x)dx)\)

Multiplying the integrating factor u(x) on the left side of the equation that converts the left side into the derivative of the product y(x)u(x).

The general solution of the differential equation is expressed as follows:

\(y=\frac{\int u(x)f(x)dx+C}{u(x)}\)

where C is an arbitrary constant.

Method 2 : Method of Variation of a Constant

This method is similar to the integrating factor method. Finding the general solution of the homogeneous equation is the first necessary step.


The general solution of the homogeneous equation always contains a constant of integration C. We can replace the constant C with a certain unknown function C(x). When substituting this solution into the nonhomogeneous differential equation, we can be able to determine the function C(x). This approach of algorithm is called the method of variation of a constant. Both the methods lead to the same solution.

Sample Example

Question :

Solve the equation \({y}’-y-xe^{x}=0\)

Solution :

Given, \({y}’-y-xe^{x}=0\)

Rewrite the given equation and the equation becomes,


Using the integrating factor, it becomes

\(u(x)=e^{\int (-1)dx}=e^{-\int dx}=e^{-x}\)

Therefore, the general solution of the linear equation is

\(y(x)=\frac{\int u(x)f(x)dx+C}{u(x)}=\frac{\int e^{-x}xe^{x}dx+C}{e^{-x}}\) \(y(x)=\frac{\int xdx+C}{e^{-x}}=e^{x}\left ( \frac{x^{2}}{2}+C \right )\).

Register with BYJU’S learning app to get more information about the maths related articles and start practice with the problems.

Practise This Question

What is the fraction of students who failed in Maths exam if total no. of students who appeared in the exam is 65 and no. of students who passed is 57?