Showing posts with label Integrating Factor. Show all posts
Showing posts with label Integrating Factor. Show all posts

Thursday, April 9

Question on Integrating Factor Method for Solving Differential Equation

Topic : Integrating Factor

Question : Explain Integrating Factor Method for Solving Differential Equation

Solution :
Suppose we have this equation to solve:
dy + y = x

dx
In this case we cannot separate the variables and introducing a new variable doesn't help either. So we need to use an entirely different method, known as Integrating Factor Method.
Here's the typical equation for which we can use this method:

dy + yP(x) = Q(x)
dx

Here the functions P(x) and Q(x) can be any functions of x, in the example above they were 1 and x respectively.
Step One: calculate the integral of the function P(x).
Step Two: the integrating factor, which we'll call IF, is defined as the exponential of this, i.e. it's defined by :

Integrating Factor = IF = e^(∫P(x) dx)
Step Three: the solution to the equation is given by:
y(x) = 1/IF ∫Q(x) IF dx
Now let us understand this using an example-
dy + y = x
dx

So P(x)=1 and Q(x)=x. The integrating factor is therefore ex, since the integral of 1 is x. (No need for a constant of integration, that's because if you do put one in it will cancel out later on anyway)
So, we can write down the solution y(x) of the equation using the "mysterious" formula given in Step Three:

y(x) = 1/IF ∫Q(x) IF dx
In this case that's:
y(x) = 1/e^x ∫xe^x dx
We can do that integral using integration by part. The result is:
y(x) = e^(-x) (xe^x - e^x + c)
which implies to
y(x) = x - 1 + ce^(-x)