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

Click For Summary

Discussion Overview

The discussion revolves around the method of variation of parameters for solving differential equations, specifically focusing on a second-order linear ordinary differential equation (ODE) with a non-homogeneous term. Participants explore the application of variation of parameters, compare it with the method of undetermined coefficients, and discuss the challenges faced in finding particular solutions.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant expresses confusion about using variation of parameters and suggests they struggle with "guessing" the solution.
  • Another participant clarifies that variation of parameters does not involve guessing, contrasting it with the method of undetermined coefficients, and outlines the process of solving the homogeneous part of the ODE.
  • It is noted that the right-hand side function in the participant's example does not fit the typical forms suitable for undetermined coefficients, which complicates the approach.
  • Some participants suggest using undetermined coefficients for simpler parts of the problem and variation of parameters for more complex terms, emphasizing the need for intelligent guessing in undetermined coefficients when the homogeneous solutions appear in the non-homogeneous term.
  • A later reply introduces an alternative method of variation of parameters attributed to Liouville, explaining how it can be applied when only one solution to the homogeneous equation is known.
  • One participant attempts to apply the method of undetermined coefficients by substituting a proposed solution into the ODE, leading to further questions about the correctness of their calculations.
  • Another participant continues the calculations but expresses uncertainty about the results, particularly regarding the integration steps involved.

Areas of Agreement / Disagreement

Participants generally agree on the distinction between variation of parameters and undetermined coefficients, but there is no consensus on the specific application or correctness of the calculations presented. Multiple competing views on the methods and their applications remain evident throughout the discussion.

Contextual Notes

Participants express uncertainty regarding the correctness of their mathematical manipulations and the assumptions underlying their approaches. There are unresolved steps in the calculations, particularly concerning the integration and application of the proposed methods.

Who May Find This Useful

This discussion may be useful for students and practitioners interested in differential equations, particularly those exploring different methods for solving linear ODEs and the nuances involved in applying variation of parameters and undetermined coefficients.

Rubik
Messages
95
Reaction score
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
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:
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.
 
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.
 
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) ?
 
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?
 
I then did this:

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

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K