Talk:Method of variation of parameters

From Wikipedia, the free encyclopedia

Contents

[edit] Using this for first-order ODEs

Can't this also be used for 1st order ODE's? Perhaps I'm thinking of a different method, but I was just looking at my Differential Equations Text, and the method seems the same, except for first order equations. Any thoughts? Gershwinrb 06:34, 1 February 2006 (UTC)

Any first-order linear ODE can be solved with little fuss — see Ordinary differential equation#General solution method for first-order linear ODEs — such that techniques like the method of variation of parameters are unnecessary. Ruakh 15:29, 1 February 2006 (UTC)

Should we also have examples for systems of equations and/or higher order ODEs? jleto

[edit] u is homogenous solution?

In the beginning of the Technique section, the article says u1 and u2 are "solutions" to the equation. It really means solutions to the homogenous equation, right? If not, I'm totally confused. This should be changed and made clear. Lavaka 05:32, 15 September 2006 (UTC)

Good call. I've fixed the article now. Ruakh 13:30, 15 September 2006 (UTC)
Thanks! Lavaka 01:55, 20 September 2006 (UTC)

[edit] Copy from Ordinary differential equation

I deleted the following text from the Ordinary differential equation where it consumed far too much space. I copied it here in case anyone is able to salvage some parts and integrate them into this article. MathMartin 20:24, 11 December 2006 (UTC)

[edit] Method of variation of parameters

As explained above, the general solution to a non-homogeneous, linear differential equation y''(x) + p(x)y'(x) + q(x)y(x) = g(x) can be expressed as the sum of the general solution yh(x) to the corresponding homogenous, linear differential equation y''(x) + p(x)y'(x) + q(x)y(x) = 0 and any one solution yp(x) to y''(x) + p(x)y'(x) + q(x)y(x) = g(x).

Like the method of undetermined coefficients, described above, the method of variation of parameters is a method for finding one solution to y''(x) + p(x)y'(x) + q(x)y(x) = g(x), having already found the general solution to y''(x) + p(x)y'(x) + q(x)y(x) = 0. Unlike the method of undetermined coefficients, which fails except with certain specific forms of g(x), the method of variation of parameters will always work; however, it is significantly more difficult to use.

For a second-order equation, the method of variation of parameters makes use of the following fact:

[edit] Fact

Let p(x), q(x), and g(x) be functions, and let y1(x) and y2(x) be solutions to the homogeneous, linear differential equation y''(x) + p(x)y'(x) + q(x)y(x) = 0. Further, let u(x) and v(x) be functions such that u'(x)y1(x) + v'(x)y2(x) = 0 and u'(x)y1'(x) + v'(x)y2'(x) = g(x) for all x, and define yp(x) = u(x)y1(x) + v(x)y2(x). Then yp(x) is a solution to the non-homogeneous, linear differential equation y''(x) + p(x)y'(x) + q(x)y(x) = g(x).

[edit] Proof

yp(x) = u(x)y1(x) + v(x)y2(x)

yp'(x) = u'(x)y1(x) + u(x)y1'(x) + v'(x)y2(x) + v(x)y2'(x)
= 0 + u(x)y1'(x) + v(x)y2'(x)
yp''(x) = u'(x)y1'(x) + u(x)y1''(x) + v'(x)y2'(x) + v(x)y2''(x)
= g(x) + u(x)y1''(x) + v(x)y2''(x)

yp''(x) + p(x)y'p(x) + q(x)yp(x) = g(x) + u(x)y1''(x) + v(x)y2''(x) + p(x)u(x)y1'(x) + p(x)v(x)y2'(x) + q(x)u(x)y1(x) + q(x)v(x)y2(x)

= g(x) + u(x)(y1''(x) + p(x)y1'(x) + q(x)y1(x)) + v(x)(y2''(x) + p(x)y2'(x) + q(x)y2(x)) = g(x) + 0 + 0 = g(x)

[edit] Usage

To solve the second-order, non-homogeneous, linear differential equation y''(x) + p(x)y'(x) + q(x)y(x) = g(x) using the method of variation of parameters, use the following steps:

  1. Find the general solution to the corresponding homogeneous equation y''(x) + p(x)y'(x) + q(x)y(x) = 0. Specifically, find two linearly independent solutions y1(x) and y2(x).
  2. Since y1(x) and y2(x) are linearly independent solutions, their Wronskian y1(x)y2'(x) − y1'(x)y2(x) is nonzero, so we can compute − (g(x)y2(x)) / (y1(x)y2'(x) − y1'(x)y2(x)) and (g(x)y1(x)) / (y1(x)y2'(x) − y1'(x)y2(x)). If the former is equal to u'(x) and the latter to v'(x), then u and v satisfy the two constraints given above: that u'(x)y1(x) + v'(x)y2(x) = 0 and that u'(x)y1'(x) + v'(x)y2'(x) = g(x). We can tell this after multiplying by the denominator and comparing coefficients.
  3. Integrate − (g(x)y2(x)) / (y1(x)y2'(x) − y1'(x)y2(x)) and (g(x)y1(x)) / (y1(x)y2'(x) − y1'(x)y2(x)) to obtain u(x) and v(x), respectively. (Note that we only need one choice of u and v, so there is no need for constants of integration.)
  4. Compute yp(x) = u(x)y1(x) + v(x)y2(x). The function yp is one solution of y''(x) + p(x)y'(x) + q(x)y(x) = g(x).
  5. The general solution is c1y1(x) + c2y2(x) + yp(x), where c1 and c2 are arbitrary constants.

[edit] Higher-order equations

The method of variation of parameters can also be used with higher-order equations. For example, if y1(x), y2(x), and y3(x) are linearly independent solutions to y'''(x) + p(x)y''(x) + q(x)y'(x) + r(x)y(x) = 0, then there exist functions u(x), v(x), and w(x) such that u'(x)y1(x) + v'(x)y2(x) + w'(x)y3(x) = 0, u'(x)y1'(x) + v'(x)y2'(x) + w'(x)y3'(x) = 0, and u'(x)y1''(x) + v'(x)y2''(x) + w'(x)y3''(x) = g(x). Having found such functions (by solving algebraically for u'(x), v'(x), and w'(x), then integrating each), we have yp(x) = u(x)y1(x) + v(x)y2(x) + w(x)y3(x), one solution to the equation y'''(x) + p(x)y''(x) + q(x)y'(x) + r(x)y(x) = g(x).

[edit] Example

Solve the previous example, y'' + y = secx Recall \sec x = \frac{1}{{\cos x}} = f. From technique learned from 3.1, LHS has root of r =  \pm i that yield yc = C1cosx + C2sinx, (so y1 = cosx, y2 = sinx ) and its derivatives

\left\{ {\begin{matrix}    {\dot u = \frac{{ - y_2 f}}{W} = \frac{{ - \sin x}}{{\cos x}} = \tan x}  \\    {\dot v = \frac{{y_1 f}}{W} = \frac{{\cos x}}{{\cos x}} = 1}  \\ \end{matrix}} \right.

where the Wronskian

W\left( {y_1,y_2 :x} \right) = \left| {\begin{matrix}    {\cos x} & {\sin x}  \\    { - \sin x} & {\cos x}  \\ \end{matrix}} \right| = 1

were computed in order to seek solution to its derivatives.

Upon integration,

\left\{ \begin{matrix}  u =  - \int {\tan x\,dx =  - \ln \left| {\sec x} \right| + C}  \\   v = \int {1\,dx = x + C}  \\   \end{matrix} \right.

Computing yp and yG:

\begin{matrix}  y_p  = f = uy_1  + vy_2  = \cos x\ln \left| {\cos x} \right| + x\sin x \\   y_G  = y_c  + y_p  = C_1 \cos x + C_2 \sin x + x\sin x + \cos x\ln \left( {\cos x} \right) \\   \end{matrix}