How Can I Use Variation of Parameters to Solve Differential Equations?

In summary, when solving an equation using the method of undetermined coefficients, the first step is to find the undetermined coefficients, which in this case are A' and A''. Next, you solve the homogeneous part of the equation using the method of variation of parameters. Finally, you use the solved homogeneous part to solve the equation for the coefficients.
  • #1
Rubik
97
0
I am trying to solve a problem along the lines of y'' + 2y' + y = e^(-x) (2 + 1/x^2).. The actual one I am trying to solve differs slightly.

I was trying to solve it using the method of variation of parameters.. However it is new to me and was too confusing.

So first I get:

y comlpiment = C1e^(-x) + C2xe^(-x)

Then do I solve

y'' + 2y' + y = 2e^(-x)

and

y'' + 2y' + y + e^(-x)/x^2

The only thing is with this method I stuggle to 'guess' the solution?
 
Physics news on Phys.org
  • #2
Variation of parameters doesn't involve guessing a solution - this is the undetermined coefficients method.

Variation of parameters works like this: You solve the homogeneous part of your linear ODE, and you suppose your coefficients are functions of x. For a second order linear ODE, the solution of the homogeneous part should look like

[tex]y_h(x) = A y_1(x) + B y_2(x)[/tex]​

Now, you assume that your general solution is

[tex]y(x) = A(x) y_1(x) + B(x) y_2(x)[/tex]​

We differentiate (these are all functions of x, but to make the notation cleaner, I will not write the (x) explicitly):

[tex]y' = A'y_1 + A y'_1 + B' y_2 + B y'_2[/tex]​

Now, since we have two unknowns, [tex]A(x)[/tex] and [tex]B(x)[/tex], we set the following condition so that [tex]A(x)[/tex] and [tex]B(x)[/tex] behave partially as if they were constant:

[tex]A'y_1 + B' y_2 = 0[/tex]​

Plugging this into the equation for the first derivative, and differentiating again, we arrive at the following system of equations for [tex]A(x)[/tex] and [tex]B(x)[/tex]:

[tex]y_1 A' + y_2 B' = 0[/tex]

[tex]y'_1 A' + y'_2 B' = f(x)[/tex]​

where [tex]f(x)[/tex] is the non-homogenous term of your ODE, in this case,

[tex]f(x) = e^{-x} \left(2 + \frac{1}{x^2}\right)[/tex]​

From here, you solve for [tex]A'[/tex] and [tex]B'[/tex] and you can easily (in theory) integrate to find [tex]A(x)[/tex] and [tex]B(x)[/tex].

Hope this helps. :)
 
Last edited:
  • #3
And even "undetermined coefficients" does not really require "guessing" the solution.

As long as the "right hand side" function is one of those we expect as solutions to linear d.e.s with constant coefficients (exponentials, sine and cosine, polynomials, and combinations of those) there are pretty strict "rules" for which functions to use.

In your example, the "right hand side" function is [itex]e^{-x}(2+ 1/x^2)[/itex] which is NOT one of those type. However, a nice thing about "linear" problems in general is that you can solve separate "parts" and then use those to find a solution to the whole problem. You do that, for example, when you use the general solution to the associated homogeneous equation to find the general solution to the entire equation.

Here, for example, yes, you could use "undetermined coefficients" to find a particular solution to [itex]y''+ 2y'+ y= 2e^{-x}[/itex] (Using [itex]y= Ax^2e^{-x}[/itex]) and then use "variation of parameters" to find a particular solution to [itex]y''+ 2y'+ y= e^{-x}/x^2[/itex]. The sum of those will be a particular solution to the entire equation. I recommend "undetermined coefficients" for the first because, when it can be used it is always simpler than "variation of parameters". I recommend "variation of parameters" for the second simply because "undetermined coefficients cannot be used- [itex]e^{-x}/x^2[/itex] could never be the solution to a linear de with constant coeficients.
 
  • #4
HallsofIvy said:
And even "undetermined coefficients" does not really require "guessing" the solution.

This is true, however you have to guess intelligently, since if the solutions of the homogeneous part actually show up on the RHS as your f(x), you have to resort to tricky "guess" functions; otherwise, this method won't work.

Variation of parameters even works for linear ODEs where the coefficients are not constant, so in this sense, it is more general - however, it requires more computational effort because some integrals are involved.

On a sidenote, there's a "second" variation of parameters method (attributed to Liouville I believe) which works when only one solution to the homogeneous equation is known. Assuming this solution is [tex]y_1[/tex], we write the solution as

[tex]y(x) = A(x) y_1(x).[/tex]​

Differentiating twice,

[tex]y'(x) = A'(x) y_1(x) + A(x) y'_1(x),[/tex]

[tex]y''(x) = A''(x) y_1(x) +2 A'(x) y'_1(x) + A(x) y''_1(x).[/tex]​

Now, if you plug these results into the original linear ODE, you'll get something like

[tex]g(x) A''(x) + h(x) A'(x) = f(x).[/tex]​

If we define [tex]A'(x) \equiv u(x)[/tex], we have the following first-order linear ODE:

[tex]g(x) u'(x) + h(x) u(x) = f(x),[/tex]​

which can be solved in any way one pleases. Once one has [tex]u(x)[/tex], we only need to integrate it to get [tex]A(x)[/tex] and plug this into [tex]y(x) = A(x) y_1(x)[/tex] to get the general solution of the differential equation.
 
  • #5
Hmm okay so if I begin by using the method of undetermined coefficients to solve y''+2y'+y=2e^(-x) using y=Ax^2e^(-x)

does this then mean:

y' = -Ax^2e^(-x) + 2A'xe^(-x) ?
y'' = Ax^(2)e^(-x) - 4xA'e^(-x) + A''xe^(-x) ?
 
  • #6
Also by substituting back into the equation y''+2y'+y=2e^(-x) using y=Ax^2e^(-x) a lot of it cancels out and I am left with:

2 = A''x (Does this seem right?)

Also from this equation I am stuck?
 
  • #7
I then did this:

A'' = 2/x
A' = 2 ln(x)
A = 2x ln(x) - 2x (Is this even remotely right?)
 

FAQ: How Can I Use Variation of Parameters to Solve Differential Equations?

What is the concept of Variation of Parameters?

Variation of Parameters is a method used in solving differential equations. It involves finding a particular solution by assuming it to be a linear combination of two known solutions of the homogeneous equation.

When is Variation of Parameters used?

Variation of Parameters is used when the coefficients in a differential equation are not constant, or when the right-hand side of the equation is not a polynomial or trigonometric function.

How does Variation of Parameters differ from other methods of solving differential equations?

Variation of Parameters is different from other methods such as the method of undetermined coefficients or the method of integrating factors, as it allows for a more general solution that can include non-polynomial or non-trigonometric functions.

What are the steps involved in using Variation of Parameters?

The steps for using Variation of Parameters are as follows: 1) Find the general solution for the homogeneous equation. 2) Assume a particular solution in the form of a linear combination of the two known solutions of the homogeneous equation. 3) Substitute the particular solution into the original equation and solve for the undetermined coefficients. 4) Add the particular solution to the general solution to obtain the complete solution.

Are there any limitations to using Variation of Parameters?

One limitation of Variation of Parameters is that it can only be used to find a particular solution, not the complete solution. It also requires the knowledge of two independent solutions of the homogeneous equation, which may not always be easily obtainable.

Similar threads

Replies
12
Views
2K
Replies
7
Views
863
Replies
1
Views
2K
Replies
2
Views
2K
Replies
4
Views
1K
Replies
16
Views
2K
Replies
2
Views
1K
Replies
5
Views
1K
Back
Top