Integrating factor An integrating factor is one of those procedures in mathematics that can seem a little odd at first and only really makes sense when you get to the end. We will start by outlining the method before showing some examples. The first problem with the integrating factor is spotting when it can be used. We will always start from a standard form of ordinary differential equation: dy f x y g x , dx where f x and g x are any two arbitrary functions of x only. Equations of this form are not separable, however, we can combine the two terms on the LHS into a single differential by using an integrating factor. The first step is to compute the integrating factor IF which is given by integrating f x then exponentiating the answer: IF e F x , where we have defined F x f x dx . It is important to note that when we integrate the function f x to get F x we don’t add on a constant. We are only really interested that the function in the integrating factor, F x , differentiates back to f x , i.e. dF f x . dx This means that the differential of the integrating factor is: d F x dF F x e f x e F x , e dx dx where we have used the chain rule. Now we multiply both sides of the equation by the integrating factor, giving: eF x dy f x e F x y g x e F x . dx This may seem like a very odd thing to do, but the reason is that the LHS is now simply the differential of the integrating factor multiplied by y : d F x dy e y eF x f x e F x y. dx dx Note that the product rule was used to differentiate e F x y , with the first term on the RHS containing the differential of y and the second term containing the differential of e F x . This now allows us to write the original equation in a far simpler form: d F x e y g x e F x . dx This equation can be solved by simply integrating both sides: dx e d F x y dx g x e F x dx, As integration is the opposite of differentiation, the operations on the LHS cancel each other out, and we get: e F x y g x e F x dx. As long as the integral on the RHS is simple enough to compute this will lead to a solution. We illustrate this procedure by going over some examples. Example 1 Q) We will solve: dy 3 y x. dx A) Comparing the question to the standard form given at the start of this help sheet: dy f x y g x , dx we can identify f x 3 and g x x . We start by working out F(x), the integral of f x : F x f ( x )dx 3dx 3x. As mentioned above, we do not need to add a constant of integration. We can now form our integrating factor: IF e 3x . Multiplying both sides of the original equation by the integrating factor we get: e3 x dy 3e3 x y xe3 x . dx It is always good practice at this point to check that the LHS is indeed the differential of the integrating factor multiplied by y : d 3x dy e y e 3x 3e 3 x y. dx dx Once we have checked that everything is working correctly we can form the simplified version of the problem: d 3x e y xe3 x , dx integrating both sides gives: e3 x y xe3 x dx. All that is left is to compute the integral on the RHS. To do this we will need to use integration by parts: uv'dx uv u' vdx. We select u x and v ' e3 x , because the x will disappear after differentiating, and apply integration by parts: u' 1, 1 v e3 x , 3 1 3x 1 3x 3x xe dx x 3 e 1 3 e dx, and finally we find: xe 3x dx x 3x 1 3x e e c. 3 9 A common mistake is to forget the constant of integration at this step. Substituting this integral into our solution we get: e3 x y x 3x 1 3x e e c. 3 9 Finally we must rearrange this equation to isolate y on the RHS to form the solution: y x 1 ce 3x . 3 9 Example 2 Q) We will solve: dy 1 y x2 dx x A) Comparing the question to the standard form: dy f x y g x , dx we see that f x 1 and g x x 2 . Note the minus sign in f x ; a common x mistake is to forget to include the minus sign in f x . We now form our integrating factor. First, by integrating f x , we find: 1 F x dx ln x ln x 1 . x Again there is no need to add a constant of integration onto this because it won’t affect the result. We can then form our integrating factor by exponentiating F x : 1 IF elnx , by using power laws we can simplify this to: 1 IF . x When we multiply the original equation by the integrating factor, we find: 1 dy 1 y x. x dx x 2 As always it is a good idea to check that the LHS of the above equation does equal the differential of the integrating factor multiplied by y : d 1 1 dy 1 y, y dx x x dx x 2 but this time the check is particularly worthwhile. If you forgot the minus sign when identifying f x then you will have formed the wrong integrating factor and you won’t be able to match this up with the question. Once we’ve checked that everything is working as we expected we can substitute this into the equation and get: d 1 y x. dx x Integrating both sides: 1 y xdx, x and completing the integration, we are left with: 1 1 y x 2 c. x 2 Rearrange the equation, isolating the y : y 1 3 x cx. 2 This is a general solution to the equation we were given.