The method of undetermined coefficients to solve differential equations was examined in an earlier blog post, i.e.

Tricks to Solving Higher Order DEs (4): Undetermined Coefficients

Which I showed could be useful in solving many linear differential equations. However, a method with wider applicability is needed to solve more challenging differential equations. That method which I will focus on here is called "the variation of parameters."

I first saw the movie reference to this mathematical technique in the 1951 version of 'The Day The Earth Stood Still'. In the film the visiting alien, Klatu, had entered the office of a physics professor named Barnhardt. When the prof saw the changes he said he still didn't understand the celestial mechanics of how a space ship like Klatu's could travel between worlds. Klatu made a few more changes, reprimanding the prof ("I thought you'd have solved it by now") and adding, "*This is the answer using variation of parameters*

**.**" The scene is shown below, from the movie:

In variation of parameters, the method entails replacing the constants in the complementary function with undetermined functions of the independent variable, x. Then determining these latter functions so that when the modified complementary function is substituted into the given differential equation, f(x) will be obtained. We use a detailed example and solution below:

*Solve*:

d^{2}y/dx ^{2 }^{ }+ y = tan x

We write the complementary function:

y _{c} = c _{1 }sin x + c^{ }_{2 }cos x

Assume: y_{p} = v _{1 }sin x + v^{ }_{2 }cos x

Where v _{1} , v^{ }_{2} will be determined such that this is a particular integral of the original differential equation, e.g. y" + y = tan x.

Then: y'_{p} = v _{1 } cos x - v^{ }_{2 }sin x + v' _{1 }sin x + v'^{ }_{2 }cos x

Impose the condition that:

v' _{1 }sin x + v'^{ }_{2 }cos x = 0

ð

y'_{p} = v _{1 } cos x - v^{ }_{2 }sin x

Then:

y''_{p} = - v _{1 }sin x - v^{ }_{2 }cos x + v' _{1 } cos x - v'^{ }_{2 }sin x

Subst. back into original DE: y" + y = tan x

ð

v' _{1 } cos x - v'^{ }_{2 }sin x = tan x

Then 2 equations are left from which to determine v' _{1 }, v'^{ }_{2}:

v' _{1 }sin x + v'^{ }_{2 }cos x = 0

v' _{1 } cos x - v'^{ }_{2 }sin x = tan x

Solving the above simultaneous eqns.:

v' _{1 }= sin x

v'^{ }_{2 }= cos x - sec x

Integrate: v _{1 } = - cos x + c^{ }_{3}

v^{ }_{2 }= sin x - ln **|**sec x + tan x **|**** ** + c^{ }_{4}

_{Substitute into: }y_{p} = v _{1 }sin x + v^{ }_{2 }cos x

ð

y_{p} = c _{3 }sin x + c^{ }_{4 }cos x - cos x (ln **|**sec x + tan x **| **

We now write:

y_{p} = A sin x + B^{ }_{ }cos x - cos x (ln **|**sec x + tan x **| **

Since we may assign any particular values A, B to the constants: c _{3} and c^{ }_{4 }.

Then write: y = y _{c} + y_{p}

ð

y = c _{1 }sin x + c^{ }_{2 }cos x +A sin x + B^{ }_{ }cos x - cos x (ln **|**sec x + tan x **|**)

Or:

y = C _{1 }sin x + C^{ }_{2 }cos x - cos x (ln **|**sec x + tan x **|**)

Where: C _{1} = c _{1 } + A, C _{2} = c _{2} + B

Thus we could as well have chosen the constants c _{3} and c^{ }_{4} = 0, for essentially the same result. I.e. The general solution to the differential equation being:

y = c _{1 }sin x + c^{ }_{2 }cos x - cos x (ln **|**sec x + tan x **|**)

*Suggested Problem:*

*Solve using variation of parameters:*

d^{2}y/dx ^{2 }- dy/ dx - 2y = ^{3x}

## No comments:

Post a Comment