Difference between revisions of "Variation Of Parameters"
Line 35: | Line 35: | ||
== Description of method == | == Description of method == | ||
− | + | ==The Method of Variation of Parameters== | |
+ | <p>Consider a general second order linear nonhomogeneous differential equation whose coefficient functions <math>p</math>, <math>q</math>, and <math>g</math> are continuous:</p> | ||
− | + | <math>\begin{align} \quad \frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = g(t) \end{align}</math> | |
+ | <p>The corresponding second order linear homogeneous differential equation is thus <math>\frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t) y = 0</math>. Suppose that we know the general solution to the corresponding second order linear homogeneous differential equation in terms of two functions <math>y_1(t)</math> and <math>y_2(t)</math> which form a fundamental set of solutions to the corresponding second order linear homogeneous differential equation, say <math>y_h(t) = Cy_1(t) + Dy_2(t)</math>.</p> | ||
+ | <p>We will now replace the constants <math>C</math> and <math>D</math> with functions, <math>u_1(t)</math> and <math>u_2(t)</math> to get:</p> | ||
− | + | <math>\begin{align} \quad Y(t) = u_1(t) y_1(t) + u_2(t) y_2(t) \end{align}</math> | |
+ | <p>We then want to try and determine what functions <math>u_1(t)</math> and <math>u_2(t)</math> make <math>Y(t) = u_1(t)y_1(t) + y_2(t)y_2(t)</math> a particular solution to our original second order linear nonhomogeneous differential equation. We first differentiate <math>y</math> and apply the product rule where appropriate to get:</p> | ||
− | + | <math>\begin{align} \quad y' = u_1'(t)y_1(t) + u_1(t)y_1'(t) + u_2'(t)y_2(t) + u_2(t)y_2'(t) \end{align}</math> | |
− | + | <p>Now we will set the terms containing the derivatives of the functions <math>u_1'(t)</math> and <math>u_2'(t)</math> to equal zero, that is <math>u_1'(t)y_1(t) + u_2'(t)y_2(t) = 0</math>. Note that this is a rather hefty assumption, however, this assumption is not rash as we're looking only for a particular solution, namely one for which this property holds. We'll see that making this assumption does not lead to any contradictions, and so:</p> | |
− | + | <math>\begin{align} \quad y' = u_1(t)y_1'(t) + u_2(t)y_2'(t) \end{align}</math> | |
+ | <p>We now differentiate again by applying the product rule where appropriate to get the second derivative of <math>y</math>:</p> | ||
− | + | <math>\begin{align} \quad y'' = u_1'(t)y_1'(t) + u_1(t)y_1''(t) + u_2'(t)y_2'(t) + u_2(t)y_2''(t) \end{align}</math> | |
+ | <p>We will now plug in <math>y</math>, <math>y'</math>, and <math>y''</math> into our second order linear nonhomogeneous differential equation to get that:</p> | ||
− | + | <math>\begin{align} \quad \frac{d^2y}{dt^2} + p(t) \frac{dy}{dt} + q(t)y = g(t) \\ \quad \left [ u_1'(t)y_1'(t) + u_1(t)y_1''(t) + u_2'(t)y_2'(t) + u_2(t)y_2''(t) \right ] + p(t) \left [ u_1(t)y_1'(t) + u_2(t)y_2'(t) \right ] + q(t) \left [ u_1(t) y_1(t) + u_2(t) y_2(t) \right ] = g(t) \\ \quad u_1(t) \underbrace{\left [ y_1''(t) + p(t)y_1'(t) + q(t)y_1(t) \right ]}_{=0} + u_2(t) \underbrace{\left [ y_2''(t) + p(t)y_2'(t) + q(t)y_2(t) \right ]}_{=0} + \left [ u_1'(t)y_1'(t) + u_2'(t)y_2'(t) \right ] = g(t) \\ \quad u_1'(t)y_1'(t) + u_2'(t)y_2'(t) = g(t) \end{align}</math> | |
+ | <p>Now recall that we supposed that <math>u_1'(t)y_1(t) + u_2'(t)y_2(t) = 0</math>. To solve for <math>u_1'(t)</math> and <math>u_2'(t)</math>, then all we need to do is solve the following system of equations:</p> | ||
− | + | <math>\begin{align} u_1'(t)y_1(t) + u_2'(t)y_2(t) = 0 \\ u_1'(t)y_1'(t) + u_2'(t)y_2'(t) = g(t) \end{align}</math> | |
− | + | <p>Recall that a unique solution exists provided that the determinant <math>\begin{vmatrix} y_1(t) & y_2(t)\\ y_1'(t) & y_2'(t) \end{vmatrix}</math> is nonzero. But this determinant is identically the Wronskian <math>W(y_1, y_2)</math>, and it is assumed that this Wronskian is nonzero since <math>y_1</math> and <math>y_2</math> form the general solution of the corresponding second order linear homogeneous differential equation, and so by apply Cramer's rule, the values of <math>u_1'(t)</math> and <math>u_2'(t)</math> are:</p> | |
− | |||
− | + | <math>\begin{align} \quad u_1'(t) = \frac{\begin{vmatrix}0 & y_2(t)\\ g(t) & y_2'(t) \end{vmatrix}}{W(y_1, y_2)} = - \frac{y_2(t)g(t)}{W(y_1, y_2)} \quad , \quad u_2'(t) = \frac{\begin{vmatrix} y_1(t) & 0\\ y_1'(t) & g(t) \end{vmatrix}}{W(y_1, y_2)} = \frac{y_1(t)g(t)}{W(y_1, y_2)} \end{align}</math> | |
+ | <p>We now integrate both sides of each equation above, and for constants <math>A</math> and <math>B</math>, we get <math>u_1(t)</math> and <math>u_2(t)</math>:</p> | ||
− | + | <math>\begin{align} \quad u_1(t) = -\int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + A \quad , \quad u_2(t) = \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt + B \end{align}</math> | |
− | : | + | <p>Therefore, a particular solution to our second order linear nonhomogeneous differential equation is:</p> |
− | + | <math>\begin{align} \quad Y(t) = u_1(t)y_1(t) + u_2(t)y_2(t) \\ \quad Y(t) = y_1(t) \left ( -\int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + A \right ) + y_2(t) \left ( \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt + B \right ) \\ \quad Y(t) = -y_1(t) \int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + y_2(t) \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt \: \underbrace{-Ay_1(t) + By_2(t)}_{=0} \\ \quad Y(t) = -y_1(t) \int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + y_2(t) \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt \end{align}</math> | |
+ | <p>And finally, the general solution to our differential equation will be:</p> | ||
− | + | <math>\begin{align} \quad y = Cy_1(t) + Dy_2(t) + Y(t) \\ \quad y = Cy_1(t) + Dy_2(t) -y_1(t) \int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + y_2(t) \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt \end{align}</math> | |
− | + | <p>Note that the method of variation of parameters is useful provided that the general solution to the corresponding second order linear homogeneous differential equation is easy to solve, and provided that the two integrals in the formula above are relatively simply to compute.</p> | |
− | |||
− | |||
− | |||
− | |||
− | |||
== Examples == | == Examples == |
Revision as of 15:18, 26 October 2021
In mathematics, variation of parameters, also known as variation of constants, is a general method to solve inhomogeneous linear ordinary differential equations.
For first-order inhomogeneous linear differential equations it is usually possible to find solutions via integrating factors or undetermined coefficients with considerably less effort, although those methods leverage heuristics that involve guessing and do not work for all inhomogeneous linear differential equations.
Variation of parameters extends to linear partial differential equations as well, specifically to inhomogeneous problems for linear evolution equations like the heat equation, wave equation, and vibrating plate equation. In this setting, the method is more often known as Duhamel's principle, named after Jean-Marie Duhamel (1797–1872) who first applied the method to solve the inhomogeneous heat equation. Sometimes variation of parameters itself is called Duhamel's principle and vice versa.
Contents
Intuitive explanation
Consider the equation of the forced dispersionless spring, in suitable units:
Here x is the displacement of the spring from the equilibrium , and F(t) is an external applied force that depends on time. When the external force is zero, this is the homogeneous equation (whose solutions are linear combinations of sines and cosines, corresponding to the spring oscillating with constant total energy).
We can construct the solution physically, as follows. Between times and , the momentum corresponding to the solution has a net change (see: Impulse (physics)). A solution to the inhomogeneous equation, at the present time t > 0, is obtained by linearly superposing the solutions obtained in this manner, for s going between 0 and t.
The homogeneous initial-value problem, representing a small impulse being added to the solution at time , is
The unique solution to this problem is easily seen to be . The linear superposition of all of these solutions is given by the integral:
To verify that this satisfies the required equation:
as required (see: Leibniz integral rule).
The general method of variation of parameters allows for solving an inhomogeneous linear equation
by means of considering the second-order linear differential operator L to be the net force, thus the total impulse imparted to a solution between time s and s+ds is F(s)ds. Denote by the solution of the homogeneous initial value problem
Then a particular solution of the inhomogeneous equation is
the result of linearly superposing the infinitesimal homogeneous solutions. There are generalizations to higher order linear differential operators.
In practice, variation of parameters usually involves the fundamental solution of the homogeneous problem, the infinitesimal solutions then being given in terms of explicit linear combinations of linearly independent fundamental solutions. In the case of the forced dispersionless spring, the kernel is the associated decomposition into fundamental solutions.
Description of method
The Method of Variation of Parameters
Consider a general second order linear nonhomogeneous differential equation whose coefficient functions , , and are continuous:
The corresponding second order linear homogeneous differential equation is thus . Suppose that we know the general solution to the corresponding second order linear homogeneous differential equation in terms of two functions and which form a fundamental set of solutions to the corresponding second order linear homogeneous differential equation, say .
We will now replace the constants and with functions, and to get:
We then want to try and determine what functions and make a particular solution to our original second order linear nonhomogeneous differential equation. We first differentiate and apply the product rule where appropriate to get:
Now we will set the terms containing the derivatives of the functions and to equal zero, that is . Note that this is a rather hefty assumption, however, this assumption is not rash as we're looking only for a particular solution, namely one for which this property holds. We'll see that making this assumption does not lead to any contradictions, and so:
We now differentiate again by applying the product rule where appropriate to get the second derivative of :
We will now plug in , , and into our second order linear nonhomogeneous differential equation to get that:
Now recall that we supposed that . To solve for and , then all we need to do is solve the following system of equations:
Recall that a unique solution exists provided that the determinant is nonzero. But this determinant is identically the Wronskian , and it is assumed that this Wronskian is nonzero since and form the general solution of the corresponding second order linear homogeneous differential equation, and so by apply Cramer's rule, the values of and are:
We now integrate both sides of each equation above, and for constants and , we get and :
Failed to parse (unknown function "\begin{align}"): {\displaystyle \begin{align} \quad u_1(t) = -\int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + A \quad , \quad u_2(t) = \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt + B \end{align}}
Therefore, a particular solution to our second order linear nonhomogeneous differential equation is:
Failed to parse (unknown function "\begin{align}"): {\displaystyle \begin{align} \quad Y(t) = u_1(t)y_1(t) + u_2(t)y_2(t) \\ \quad Y(t) = y_1(t) \left ( -\int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + A \right ) + y_2(t) \left ( \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt + B \right ) \\ \quad Y(t) = -y_1(t) \int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + y_2(t) \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt \: \underbrace{-Ay_1(t) + By_2(t)}_{=0} \\ \quad Y(t) = -y_1(t) \int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + y_2(t) \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt \end{align}}
And finally, the general solution to our differential equation will be:
Failed to parse (unknown function "\begin{align}"): {\displaystyle \begin{align} \quad y = Cy_1(t) + Dy_2(t) + Y(t) \\ \quad y = Cy_1(t) + Dy_2(t) -y_1(t) \int \frac{y_2(t)g(t)}{W(y_1, y_2)} \: dt + y_2(t) \int \frac{y_1(t)g(t)}{W(y_1, y_2)} \: dt \end{align}}
Note that the method of variation of parameters is useful provided that the general solution to the corresponding second order linear homogeneous differential equation is easy to solve, and provided that the two integrals in the formula above are relatively simply to compute.
Examples
First-order equation
The general solution of the corresponding homogeneous equation (written below) is the complementary solution to our original (inhomogeneous) equation:
- .
This homogeneous differential equation can be solved by different methods, for example separation of variables:
The complementary solution to our original equation is therefore:
Now we return to solving the non-homogeneous equation:
Using the method variation of parameters, the particular solution is formed by multiplying the complementary solution by an unknown function C(x):
By substituting the particular solution into the non-homogeneous equation, we can find C(x):
We only need a single particular solution, so we arbitrarily select for simplicity. Therefore the particular solution is:
The final solution of the differential equation is:
This recreates the method of integrating factors.
Specific second-order equation
Let us solve
We want to find the general solution to the differential equation, that is, we want to find solutions to the homogeneous differential equation
The characteristic equation is:
Since is a repeated root, we have to introduce a factor of x for one solution to ensure linear independence: u1 = e−2x and u2 = xe−2x. The Wronskian of these two functions is
Because the Wronskian is non-zero, the two functions are linearly independent, so this is in fact the general solution for the homogeneous differential equation (and not a mere subset of it).
We seek functions A(x) and B(x) so A(x)u1 + B(x)u2 is a particular solution of the non-homogeneous equation. We need only calculate the integrals
Recall that for this example
That is,
where and are constants of integration.
General second-order equation
We have a differential equation of the form
and we define the linear operator
where D represents the differential operator. We therefore have to solve the equation for , where and are known.
We must solve first the corresponding homogeneous equation:
by the technique of our choice. Once we've obtained two linearly independent solutions to this homogeneous differential equation (because this ODE is second-order) — call them u1 and u2 — we can proceed with variation of parameters.
Now, we seek the general solution to the differential equation which we assume to be of the form
Here, and are unknown and and are the solutions to the homogeneous equation. (Observe that if and are constants, then .) Since the above is only one equation and we have two unknown functions, it is reasonable to impose a second condition. We choose the following:
Now,
Differentiating again (omitting intermediary steps)
Now we can write the action of L upon uG as
Since u1 and u2 are solutions, then
We have the system of equations
Expanding,
So the above system determines precisely the conditions
We seek A(x) and B(x) from these conditions, so, given
we can solve for (A′(x), B′(x))T, so
where W denotes the Wronskian of u1 and u2. (We know that W is nonzero, from the assumption that u1 and u2 are linearly independent.) So,
While homogeneous equations are relatively easy to solve, this method allows the calculation of the coefficients of the general solution of the in homogeneous equation, and thus the complete general solution of the inhomogeneous equation can be determined.
Note that and are each determined only up to an arbitrary additive constant (the constant of integration). Adding a constant to or does not change the value of because the extra term is just a linear combination of u1 and u2, which is a solution of by definition.
Higher Order
References
- Coddington, Earl A.; Levinson, Norman (1955). Theory of Ordinary Differential Equations. McGraw-Hill.
- Boyce, William E.; DiPrima, Richard C. (2005). Elementary Differential Equations and Boundary Value Problems (8th ed.). Wiley. pp. 186–192, 237–241.
- Teschl, Gerald (2012). Ordinary Differential Equations and Dynamical Systems. American Mathematical Society.
Licensing
Content obtained and/or adapted from:
- Variation of parameters, Wikipedia under a CC BY-SA license