Method of variation of parameters
In mathematics, variation of parameters is a technique used in solving certain second order linear inhomogeneous ordinary differential equations.
Technique
We have a differential equation of the form
- <math>u''+p(x)u'+q(x)u=f(x)\,<math>
and we define the linear operator
- <math>L=D^2+p(x)D+q(x)\,<math>
where D represents the differential operator
Suppose we have two linearly independent solutions to the given differential equation, u1 and u2. Let W be the Wronskian of these two functions, and W must be nonzero since we have supposed the solutions are linearly independent.
Now, the general solution to the differential equation is of the form
- <math>A(x)u_1(x)+B(x)u_2(x)=u_G(x)\,<math>
We desire A=A(x) and B=B(x) to be of the form
- <math>A'(x)u_1(x)+B'(x)u_2(x)=0\,<math>
Now,
- <math>u_G'(x)=(A(x)u_1(x)+B(x)u_2(x))'=(A(x)u_1(x))'+(B(x)u_2(x))'\,<math>
- <math>=A'(x)u_1(x)+A(x)u_1'(x)+B'(x)u_2(x)+B(x)u_2'(x)\,<math>
- <math>=A'(x)u_1(x)+B'(x)u_2(x)+A(x)u_1'(x)+B(x)u_2'(x)\,<math>
and since we have required the above condition, then we have
- <math>u_G'(x)=A(x)u_1(x)'+B(x)u_2'(x)\,<math>
Differentiating again (omitting intermediary steps)
- <math>u_G''(x)=A(x)u_1''(x)+B(x)u_2''(x)+A(x)'u_1(x)'+B(x)'u_2'(x)\,<math>
Now we can write the action of L upon uG as
- <math>Lu_G=A(x)Lu_1(x)+B(x)Lu_2(x)+A(x)'u_1(x)'+B(x)'u_2'(x)\,<math>
Since u1 and u2 are solutions, then
- <math>Lu_G=A(x)'u_1(x)'+B(x)'u_2'(x)\,<math>
We have the system of equations
- <math>\begin{pmatrix}
u_1(x) & u_2(x) \\ u_1'(x) & u_2'(x) \end{pmatrix} \begin{pmatrix} A'(x) \\ B'(x)\end{pmatrix} = \begin{pmatrix} 0\\ f\end{pmatrix}<math> Expanding,
- <math>\begin{pmatrix}
A'(x)u_1(x)+B'(x)u_2(x)\\ A(x)'u_1(x)'+B(x)'u_2'(x)\end{pmatrix} = \begin{pmatrix} 0\\f\end{pmatrix}<math> So the above system determines precisely the conditions
- <math>A'(x)u_1(x)+B'(x)u_2(x)=0\,<math>
- <math>A(x)'u_1(x)'+B(x)'u_2'(x)=Lu_G=f\,<math>
We seek A(x) and B(x) from these conditions, so, given
- <math>\begin{pmatrix}
u_1(x) & u_2(x) \\ u_1'(x) & u_2'(x) \end{pmatrix} \begin{pmatrix} A'(x) \\ B'(x)\end{pmatrix} = \begin{pmatrix} 0\\ f\end{pmatrix}<math> we can solve for (A′(x), B′(x))T, so
- <math>\begin{pmatrix}
A'(x) \\ B'(x)\end{pmatrix}= \begin{pmatrix} u_1(x) & u_2(x) \\ u_1'(x) & u_2'(x) \end{pmatrix}^{-1} \begin{pmatrix} 0\\ f\end{pmatrix}<math>
- <math>={1\over W}
\begin{pmatrix} u_2'(x) & -u_2(x) \\ -u_1'(x) & u_1'(x) \end{pmatrix} \begin{pmatrix} 0\\ f\end{pmatrix}<math>
So,
- <math>A'(x) = – {1\over W} u_2(x) f(x),\; B'(x) = {1 \over W} u_1(x)f(x)<math>
- <math>A(x) = – \int {1\over W} u_2(x) f(x)\,dx,\; B(x) = \int {1 \over W} u_1(x)f(x)\,dx<math>
Whilst homogeneous equations are relatively easy to solve, this method allows the calculation of the coefficients of the general solution of the inhomogeneous equation, and thus the complete general solution of the inhomogeneous equation can be determined.
Example usage
Let us solve
- <math> y''+4y'+4=\cosh{x}\;\!<math>
We want to find the general solution to the differential equation, that is, we want to find solutions to the homogeneous differential equation
- <math>y''+4y'+4=0\;\!<math>
Form the characteristic equation
- <math>\lambda^2+4\lambda+4=(\lambda+2)^2=0\;\!<math>
- <math>\lambda=-2,-2\;\!<math>
Since we have a repeated root, we have to introduce a factor of x for one solution to ensure linear independence.
So, we obtain u1=e-2x, and u2=xe-2x. The Wronskian of these two functions is
- <math>\begin{vmatrix}
e^{-2x} & xe^{-2x} \\
-2e^{-2x} & -e^{-2x}(2x-1)\\ \end{vmatrix} = -e^{-2x}e^{-2x}(2x-1)+2xe^{-2x}e^{-2x} <math>
- <math>= -e^{-4x}(2x-1)+2xe^{-4x}= (-2x+1+2x)e^{-4x} = e^{-4x}\;\!<math>
We seek functions A(x) and B(x) so A(x)u1+B(x)u2 is a general solution of the inhomogeneous equation. We need only calculate the integrals
- <math>A(x) = – \int {1\over W} u_2(x) f(x)\,dx,\; B(x) = \int {1 \over W} u_1(x)f(x)\,dx<math>
that is,
- <math>A(x) = – \int {1\over e^{-4x}} xe^{-2x} \cosh{x}\,dx = – \int xe^{2x}\cosh{x}\,dx = -{1\over 18}e^x(9(x-1)+e^{2x}(3x-1))<math>
- <math>B(x) = \int {1 \over e^{-4x}} e^{-2x} \cosh{x}\,dx = \int e^{2x}\cosh{x}\,dx ={1\over 6}e^{x}(3+e^{2x}) <math>
Categories: Ordinary differential equations