## How To Solve Nonhomogeneous Differential Equations?

Non-homogeneous linear differential equations can be solved by obtaining the general solution of the corresponding homogeneous differential equation, , and the particular solution of the non-homogeneous equation, .

**Particular Solution:** A solution yP(x) of a differential equation that contains no arbitrary constants is known as a particular solution to the equation.

Assume we have a non-homogeneous linear differential equation of second order, as given below.

is known as the complementary equation.

Both a and b are constants in this equation. As a result, the nonhomogeneous differential equation with a general solution arises, as shown below.

: General Solution

: Particular Solution

The nth-order non-homogeneous linear differential equation can be used to extend this. This linear differential equation's general solution is provided below.

## How To Find Particular Solution of a Nonhomogeneous Differential Equation?

There are the two most frequent methods for determining the particular solution of a non-homogeneous differential equation:

1.) Method of Undetermined Coefficients

2.) Method of Variation of Parameters

### Method of Undetermined Coefficients

Let's break down the steps of the method of undetermined coefficients and identify when it's appropriate to utilize it. When the right-hand side of our non-homogeneous differential equation is a function that can be expressed as the sum or product of the following functions, the undetermined coefficient technique works best:

Once we identify the form of g(x), we guess for the particular solution, yp. We have shown some examples below where we guessed the particular solution for some g(x).

Letâ€™s look at the example below to understand how this method works.

**Example: **Find the general solution to .

**Solution: **The complementary equation is , with the general solution .

Since, r(x) = 3x, the particular equation might have form . In this case

For đť‘¦đť‘ť to be a solution to the differential equation, we must find values for **a** and **b** such that

Equalizing the coefficients, we get:

3a = 3 => a = 1

4a+3b = 0 => b = -4/3

Therefore, and the general solution is .

### Method of Variation of Parameters

r(x) isn't always made up of polynomials, exponentials, or sines and cosines. When this happens, the method of undetermined coefficients fails, and we must apply an alternative method to obtain a specific solution to the differential equation. We use a technique known as the method of Variation of parameters.

Let's say we have a non-homogeneous linear differential equation of second order, as given below.

, where p and q are constants.

If the general solution to the complementary equation is given by , then the particular solution is given by

**Read Also - **Difference between argument and parameter

## FAQs

**1. Define Nonhomogeneous Differential Equation.**

Nonhomogeneous differential equations are the differential equations that contain functions on the right-hand side of the equations.

**2. Mention some examples of the Nonhomogeneous differential equations. **

A few examples of Nonhomogeneous differential equations are:-

a.) yâ€™â€™+yâ€™-5y = sin(x)

b.) yâ€™â€™-10yâ€™+6y = 4x+5

**3. What is the difference between homogeneous and nonhomogeneous differential equations?**

In homogeneous differential equation, the equation has zero in R.H.S while in nonhomogeneous differential equation, it contains functions on the right-hand side of the equation.

## Key Takeaways

In this article, we have extensively discussed Nonhomogeneous Differential Equations, their definition, and how to solve nonhomogeneous differential equations. If you want to learn more, check out our articles on the Partial Differential Equations, and System of Linear Equations.

Do upvote our blog to help other ninjas grow.

Happy Coding!