General solution y''+2y'+y=x(e^-x)+1

In summary, x2(Ax+B)e-x+C is the correct form for the particular solution of the equation y''+2y'+y=xe-x+1.
  • #1
ToastIQ
11
0
Hi!

I'm having a hard time with general solutions of a certain type, maybe it has to do with the constant in the particular solution?

The equation is

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

Is it right to assume that yh=(C1x+C2)e-x ?

For the particular solution, I've tried all kinds of guesses for the form:

yp=
(C1x+C2)e-x
(C1x3+C2x2)e-x
C1x3e-x+C2x2
C1x3e-x+C2x2+C3x+C4

and more of the kind. I honestly have no clue what form's the right one. Help would be much appreciated.

Also, I've found some tables that show which form can be used for different kinds of equations. They're very handy, but usually just the kind of equation I'm looking for is missing. If some kind soul out there could help me understand when to use which form (like those tables), that would make my day. It was all good in the beginning but by now, I'm just confused about the different forms, when to use which one.
 
Physics news on Phys.org
  • #2
The characteristic equation association with the homogeneous solution has a repeated root, and so the homogeneous solution will be:

\(\displaystyle y_h()x)=c_1e^{-x}+c_2xe^{-x}\)

Because the term on the RHS $xe^{-x}$ is a homogeneous solution, our particular solution will take the form:

\(\displaystyle y_p(x)=x^2(Ax+B)e^{-x}+C\)

Do you see why the $x^2$ is required to ensure that no term in the particular solution is a solution to the corresponding homogeneous equation?
 
  • #3
MarkFL said:
The characteristic equation association with the homogeneous solution has a repeated root, and so the homogeneous solution will be:

\(\displaystyle y_h()x)=c_1e^{-x}+c_2xe^{-x}\)

Because the term on the RHS $xe^{-x}$ is a homogeneous solution, our particular solution will take the form:

\(\displaystyle y_p(x)=x^2(Ax+B)e^{-x}+C\)

Do you see why the $x^2$ is required to ensure that no term in the particular solution is a solution to the corresponding homogeneous equation?
Thanks for your reply.

So I believe my homogeneous solution was correct?

I know that there can't be any terms in the particular solution that are a solution to the homogeneous equation. I can't fully wrap my head around why though.

Can you see right when starting with the particular solution if it contains a solution to the homogeneous equation? Like, in this case, the particular solution has the form (before multiplying with x)
(Ax+B)e-x+C
and I can see right away that both Axe-x and Be-x appear in the homogeneous equation.
But if I multiply with x and get the form
(Ax2+Bx)e-x+C
I can't see how this also contains a solution to the homogeneous equation. So I don't understand why x1 isn't enough, why it has to be x2.

Do you have to go through all the steps for the particular solution, setting up y(x), y'(x) and y''(x) and substituting those into the equation to see if you need to multiply with one more x?
However. When I use the form y(x)=x2(Ax+B)e-x+C I'm still making mistakes somewhere.

y(x)=x2(Ax+B)e-x+C
y'(x)=(3Ax2-Ax3+2Bx-Bx2)e-x
y''(x)=(6Ax-6Ax2+Ax3-4Bx+Bx2)e-x

-> 6Axe-x+C = xe-x+1 (<- B canceled out?)
A=1/6​
C=1​

The general solution is supposed to be

y=e-x(1/6x3-x-1)+1
 
  • #4
ToastIQ said:
Thanks for your reply.

So I believe my homogeneous solution was correct?

You stated:

\(\displaystyle y_h=\left(c_1+c_2\right)e^{-x}\)

But what we want is:

\(\displaystyle y_h(x)=c_1e^{-x}+c_2xe^{-x}\)

ToastIQ said:
I know that there can't be any terms in the particular solution that are a solution to the homogeneous equation. I can't fully wrap my head around why though.

Can you see right when starting with the particular solution if it contains a solution to the homogeneous equation? Like, in this case, the particular solution has the form (before multiplying with x)
(Ax+B)e-x+C
and I can see right away that both Axe-x and Be-x appear in the homogeneous equation.
But if I multiply with x and get the form
(Ax2+Bx)e-x+C
I can't see how this also contains a solution to the homogeneous equation. So I don't understand why x1 isn't enough, why it has to be x2.

If we expand we get:

\(\displaystyle y_p(x)=Ax^2e^{-x}+Bxe^{-x}+C\)

The second term, \(\displaystyle Bxe^{-x}\) is a solution to the corresponding homogeneous equation. That's why we need:

\(\displaystyle y_p(x)=x^2(Ax+B)e^{-x}+C\)

ToastIQ said:
Do you have to go through all the steps for the particular solution, setting up y(x), y'(x) and y''(x) and substituting those into the equation to see if you need to multiply with one more x?

No, you just need to ensure no terms of the particular solution are solutions of the homogeneous equation.

ToastIQ said:
However. When I use the form y(x)=x2(Ax+B)e-x+C I'm still making mistakes somewhere.

y(x)=x2(Ax+B)e-x+C
y'(x)=(3Ax2-Ax3+2Bx-Bx2)e-x
y''(x)=(6Ax-6Ax2+Ax3-4Bx+Bx2)e-x

-> 6Axe-x+C = xe-x+1 (<- B canceled out?)
A=1/6​
C=1​

The general solution is supposed to be

y=e-x(1/6x3-x-1)+1

Okay, with the particular solution, we have:

\(\displaystyle y_p(x)=x^2(Ax+B)e^{-x}+C\)

\(\displaystyle y_p'(x)=-x\left(Ax^2-3Ax+Bx-2B\right)e^{-x}\)

\(\displaystyle y_p''(x)=\left(Ax^3-6Ax^2+6Ax+Bx^2-4Bx+2B\right)e^{-x}\)

It looks like we have different results for \(\displaystyle y_p''(x)\).
 
  • #5
MarkFL said:
You stated:

\(\displaystyle y_h=\left(c_1+c_2\right)e^{-x}\)

But what we want is:

\(\displaystyle y_h(x)=c_1e^{-x}+c_2xe^{-x}\)

I don't know if I'm missing out on something here but I think it said
yh=(C1x+C2)e-x
which after expanding the brackets should become
C1xe-x+C2e-x
which is basically the same as C1e-x+C2xe-x or am I wrong? Just that the x is with C1 instead of C2.
Does it make a difference if the x is with C1 or C2 as long as you stick to the same setup all the way to the end? I'm wondering because in my class we learned to put the x with the first coefficient, in this case C1.

MarkFL said:
If we expand we get:

\(\displaystyle y_p(x)=Ax^2e^{-x}+Bxe^{-x}+C\)

The second term, \(\displaystyle Bxe^{-x}\) is a solution to the corresponding homogeneous equation. That's why we need:

\(\displaystyle y_p(x)=x^2(Ax+B)e^{-x}+C\)

Ah, I see. Thanks.

MarkFL said:
Okay, with the particular solution, we have:

\(\displaystyle y_p(x)=x^2(Ax+B)e^{-x}+C\)

\(\displaystyle y_p'(x)=-x\left(Ax^2-3Ax+Bx-2B\right)e^{-x}\)

\(\displaystyle y_p''(x)=\left(Ax^3-6Ax^2+6Ax+Bx^2-4Bx+2B\right)e^{-x}\)

It looks like we have different results for \(\displaystyle y_p''(x)\).

True, the 2B term was actually there but I totally lost it in this mess of letters and numbers. So I get
(6Ax+2B)e-x+C=xe-x+1

Which gives me
A=1/6​
B=0 (?)​
C=1​

If that is correct, then yp=1/6x3e-x+1

But when I put yh and yp together, it doesn't look like the right solution (y=e-x(1/6x3-x-1)+1). I don't understand how to get the -x and -1 aswell. I've done so many similar problems, I don't know why this one is so hard for me.
 
  • #6
ToastIQ said:
I don't know if I'm missing out on something here but I think it said
yh=(C1x+C2)e-x

Okay, so it did. I missed that before, even when I double checked. I would advise you to use $\LaTeX$ which is easier to read in general, and easier to use rather than all those superscript and subscript BBCodes. :)

ToastIQ said:
...True, the 2B term was actually there but I totally lost it in this mess of letters and numbers. So I get
(6Ax+2B)e-x+C=xe-x+1

Which gives me
A=1/6​
B=0 (?)​
C=1​

If that is correct, then yp=1/6x3e-x+1

But when I put yh and yp together, it doesn't look like the right solution (y=e-x(1/6x3-x-1)+1). I don't understand how to get the -x and -1 aswell. I've done so many similar problems, I don't know why this one is so hard for me.

Okay, if your particular solution is:

\(\displaystyle y_p(x)=\frac{1}{6}x^3e^{-x}+1\)

Then the general solution is:

\(\displaystyle y(x)=c_1e^{-1}+c_2xe^{-x+}+\frac{1}{6}x^3e^{-x}+1\)

Did you give initial conditions, because I didn't see any?
 
  • #7
MarkFL said:
Okay, so it did. I missed that before, even when I double checked. I would advise you to use $\LaTeX$ which is easier to read in general, and easier to use rather than all those superscript and subscript BBCodes. :)

Yeah sorry, you're right, I really need to learn how to use Latex! :D

MarkFL said:
Okay, if your particular solution is:

\(\displaystyle y_p(x)=\frac{1}{6}x^3e^{-x}+1\)

Then the general solution is:

\(\displaystyle y(x)=c_1e^{-1}+c_2xe^{-x+}+\frac{1}{6}x^3e^{-x}+1\)

Did you give initial conditions, because I didn't see any?

Jesus. I moved on from this problem long ago, always thinking "There have to be initial conditions" but I couldn't see any. Went back to look again for the 3rd time when you asked and THAT'S when I found out I had been looking at a different problem (very similar, but without conditions). Been so fed up with this problem and busy trying to figure out the general solution I couldn't even get the most basic things taken care of.

The initial conditions were:
\(\displaystyle y(0)=y'(0)=0
\\y=(c_1+c_2x+\frac{1}{6}x^3)e^{-x}+1
\\y'=(-c_1-c_2x+c_2-\frac{1}{6}x^3+\frac{1}{2}x^2)e^{-x}
\\ ~\\
y(0)=0:
\\(c_1+c_2\cdot0+\frac{1}{6}\cdot0+\frac{1}{2}\cdot0)e^{0}+1=0
\\c_1+1=0
\\c_1=-1
\\~\\
y'(0)=0:
\\(-c_1-c_2\cdot0+c_2-\frac{1}{6}\cdot0+\frac{1}{2}\cdot0)e^{0}=0
\\-c_1+c_2=0
\\c_2=c_1=-1

\\~\\
y=(-1-1\cdot x+\frac{1}{6}x^3)e^{-x}+1
\\y=(\frac{1}{6}x^3-x-1)e^{-x}+1
\)

(First try on Latex, hope it will show up okay)
Thanks so much for bearing with my confused mind haha :D
 
  • #8
I'm glad you got it all sorted out, and excellent job on your use of $\LaTeX$. I appreciate it, as it is easier on the eyes for math, and you appear to have picked it up very quickly.
 
  • #9
MarkFL said:
I'm glad you got it all sorted out, and excellent job on your use of $\LaTeX$. I appreciate it, as it is easier on the eyes for math, and you appear to have picked it up very quickly.

Thanks! What can I say, Google rarely ever disappoints me as a friend :D I totally agree with you. It just seemed so complicated at first, but it's so worth it.
 

Related to General solution y''+2y'+y=x(e^-x)+1

1. What is a general solution?

A general solution is a solution that satisfies all possible initial conditions for a given differential equation. It includes all possible solutions and can be written in a form that contains one or more arbitrary constants.

2. How do you solve a second-order linear differential equation?

To solve a second-order linear differential equation, you need to find the general solution by first solving the corresponding homogeneous equation and then finding a particular solution using the method of undetermined coefficients or variation of parameters.

3. How do you handle the non-homogeneous term in a differential equation?

The non-homogeneous term in a differential equation can be handled by finding a particular solution using the method of undetermined coefficients or variation of parameters. This particular solution is then added to the general solution of the corresponding homogeneous equation to get the final solution.

4. What is the role of arbitrary constants in a general solution?

The arbitrary constants in a general solution represent the different possible solutions to a differential equation. They allow for the general solution to satisfy all possible initial conditions and can be determined by applying the initial conditions given in a specific problem.

5. How do you check if a particular solution is correct?

To check if a particular solution is correct, you can substitute it back into the original differential equation and see if it satisfies the equation. If it does, then the particular solution is correct. Additionally, you can also check the solution by finding its derivatives and plugging them into the differential equation to see if the equation holds true.

Similar threads

  • Differential Equations
Replies
4
Views
3K
  • Differential Equations
Replies
5
Views
1K
  • Differential Equations
Replies
6
Views
2K
  • Differential Equations
Replies
7
Views
3K
  • Differential Equations
Replies
1
Views
995
  • Differential Equations
Replies
8
Views
2K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
2
Views
2K
Replies
3
Views
1K
Replies
7
Views
2K
Back
Top