How can I use variation of parameters to solve this equation?

vanceEE
Messages
109
Reaction score
2

Homework Statement


$$y'' - 2y = x + 1$$


Homework Equations


$$ y_{o} = Ae^{√(2)x} + Be^{-√(2)x} $$
$$ v_{1}'e^{√(2)x} + v_{2}'e^{-√(2)x}\equiv 0 $$
$$ √(2)v_{1}'e^{√(2)x}-√(2) - v_{2}'e^{-√(2)x} = x + 1 $$


The Attempt at a Solution



$$ v_{2}' = \frac{x+1}{-2√(2)e^{-√(2)x}} $$
$$ v_{2} = (\frac{-x}{4}+\frac{√2}{8}-\frac{1}{4})*e^{√(2)x} $$

$$v_{1}' = (\frac{x+1}{-2√(2)e^{-√(2)x}})(e^{-2√(2)x})$$
$$v_{1} = (\frac{-x}{4}-\frac{√2 + 2}{8})*e^{-√(2)x}$$

$$ y = Ae^{√(2)x} + Be^{-√(2)x} + (\frac{-x}{4}-\frac{√2 + 2}{8})*e^{-√(2)x} + (\frac{-x}{4}+\frac{√2}{8}-\frac{1}{4})*e^{√(2)x} $$

Where's my error? The correct solution is $$ y = Ae^{√(2)x} + Be^{-√(2)x} - \frac{x}{2} - \frac{1}{2}$$
 
Physics news on Phys.org

Homework Statement


$$y'' - 2y = x + 1$$

Homework Equations


$$ y_{h} = Ae^{√(2)x} + Be^{-√(2)x} $$
$$ v_{1}'e^{√(2)x} + v_{2}'e^{-√(2)x}\equiv 0 $$
$$ √(2)v_{1}'e^{√(2)x}-√(2) - v_{2}'e^{-√(2)x} = x + 1 $$

The Attempt at a Solution



$$ v_{2}' = \frac{x+1}{-2√(2)e^{-√(2)x}} $$
$$ v_{2} = (\frac{-x}{4}+\frac{√2}{8}-\frac{1}{4})*e^{√(2)x} $$

$$v_{1}' = (\frac{x+1}{-2√(2)e^{-√(2)x}})(e^{-2√(2)x})$$
$$v_{1} = (\frac{-x}{4}-\frac{√2 + 2}{8})*e^{-√(2)x}$$

$$ y = Ae^{√(2)x} + Be^{-√(2)x} + (\frac{-x}{4}-\frac{√2 + 2}{8})*e^{-√(2)x} + (\frac{-x}{4}+\frac{√2}{8}-\frac{1}{4})*e^{√(2)x} $$

Where's my error? The correct solution is $$ y = Ae^{√(2)x} + Be^{-√(2)x} - \frac{x}{2} - \frac{1}{2}$$
 
Last edited:
Since I am letting $$ y(x) = v_{1}y_{1} + v_{2}y_{2} $$ my error is that I did not multiply v_{1} and v_{2} by the associated homogeneous solutions, correct?
$$y_{o}(x) =(\frac{-xe^{√(2)x}}{4}+\frac{√2e^{√(2)x}}{8}-\frac{e^{√(2)x}}{4})*e^{-√(2)x} + (\frac{-xe^{-√(2)x}}{4}-\frac{(√2 + 2)e^{-√(2)x}}{8})*e^{√(2)x} $$
$$= -(\frac{x}{2}+\frac{1}{2}) $$

$$ y(x) = Ae^{√(2)x} + Be^{-√(2)x} -(\frac{x}{2}+\frac{1}{2}) $$
 
Last edited:
The particular solution is ##y_p = u_1 y_1 + u_2 y_2##. You forgot the y's.
 
vanceEE said:

Homework Statement


$$y'' - 2y = x + 1$$

Homework Equations


$$ y_{o} = Ae^{√(2)x} + Be^{-√(2)x} $$
$$ v_{1}'e^{√(2)x} + v_{2}'e^{-√(2)x}\equiv 0 $$
$$ √(2)v_{1}'e^{√(2)x}-√(2) - v_{2}'e^{-√(2)x} = x + 1 $$

The Attempt at a Solution



$$ v_{2}' = \frac{x+1}{-2√(2)e^{-√(2)x}} $$
$$ v_{2} = (\frac{-x}{4}+\frac{√2}{8}-\frac{1}{4})*e^{√(2)x} $$

$$v_{1}' = (\frac{x+1}{-2√(2)e^{-√(2)x}})(e^{-2√(2)x})$$
$$v_{1} = (\frac{-x}{4}-\frac{√2 + 2}{8})*e^{-√(2)x}$$

$$ y = Ae^{√(2)x} + Be^{-√(2)x} + (\frac{-x}{4}-\frac{√2 + 2}{8})*e^{-√(2)x} + (\frac{-x}{4}+\frac{√2}{8}-\frac{1}{4})*e^{√(2)x} $$

Where's my error? The correct solution is $$ y = Ae^{√(2)x} + Be^{-√(2)x} - \frac{x}{2} - \frac{1}{2}$$

Variation of parameters is overkill for a problem like this. You should easily be able to find a particular solution to your original ODE by inspection. But your problem is that ##v_1+v_2## isn't part of your solution. You have to multiply them by the homogeneous parts. You want ##v_1 e^{\sqrt{2} x}+v_2 e^{-\sqrt{2} x}##. The exponential parts will cancel in the particular solution.
 
vanceEE said:
Since I am letting $$ y(x) = v_{1}y_{1} + v_{2}y_{2} $$ my error is that I did not multiply v_{1} and v_{2} by the associated homogeneous solutions, correct?
$$y(x) =(\frac{-xe^{√(2)x}}{4}+\frac{√2e^{√(2)x}}{8}-\frac{e^{√(2)x}}{4})*e^{-√(2)x} + (\frac{-xe^{-√(2)x}}{4}-\frac{(√2 + 2)e^{-√(2)x}}{8})*e^{√(2)x} $$
$$= -(\frac{x}{2}+\frac{1}{2}) $$

Exactly, as I said in your other thread. Please don't double post, I assume this was an accident.
 
Dick said:
Please don't double post, I assume this was an accident.

What do you mean by double posting? Did I post two forums or are you referring to me editing what I've posted on my forum?
 
vanceEE said:
What do you mean by double posting? Did I post two forums or are you referring to me editing what I've posted on my forum?

I'm referring to the fact there are two threads called "Variation of Parameters" by vanceEE in the "Calculus and Beyond" forum. You are working on one, I was working on the other.
 
Dick said:
You should easily be able to find a particular solution to your original ODE by inspection.

Please explain what you mean by solving by inspection.
 
  • #10
Dick said:
I'm referring to the fact there are two threads called "Variation of Parameters" by vanceEE in the "Calculus and Beyond" forum. You are working on one, I was working on the other.

Sorry, just noticed that. BTW, what did you mean by solving by inspection?
 
  • #11
vanceEE said:
Please explain what you mean by solving by inspection.

Guess a form for the particular solution, say y=ax+b, then y''=0. So y''-2y=x+1 gives -2(ax+b)=x+1, so a=b=(-1/2) and y=-x/2-1/2 works. If the inhomogeneous part is a polynomial, guess a polynomal form and try to solve for it. If it works, it's usually a lot easier than the variation of parameters track.
 
  • #12
vanceEE said:
Sorry, just noticed that. BTW, what did you mean by solving by inspection?

See other thread.
 
  • #13
Dick said:
Guess a form for the particular solution, say y=ax+b, then y''=0. So y''-2y=x+1 gives -2(ax+b)=x+1, so a=b=(-1/2) and y=-x/2-1/2 works. If the inhomogeneous part is a polynomial, guess a polynomal form and try to solve for it. If it works, it's usually a lot easier than the variation of parameters track.

Oh, and yes you're right; I'm aware that I could have used an easier method like undetermined constants to find this solution but the question asked me to use variation of parameters to find a solution for the equation.
 
Last edited:
  • #14
vanceEE said:
Oh, and yes you're right; I'm aware that I could have used an easier method like undetermined constants to find this solution but the question asked me to use variation of parameters to find a solution for the equation.

I thought so, just checking that you also saw how easy it really was if you don't have to use variation of parameters.
 
Back
Top