Welcome to our community

Be a part of something great, join today!

[SOLVED] 17.2.05 Solve the given equation by the method of undetermined coefficients.

karush

Well-known member
Jan 31, 2012
2,928
$\textrm{Solve the given equation by the method of undetermined coefficients.}$
\begin{align*}\displaystyle
y'' +6y'&=-4xe^{-6x}\\
y_p&=Ax^2e^{-6x}+Bxe^{-6x}
\end{align*}


ok just wanted get this posted before I leave campus
so assume finding zeros is next
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Yes, in order to get the general solution to the given ODE, you will need the homogeneous solution, and this involves finding the roots (zeroes) of the characteristic equation. :D
 

karush

Well-known member
Jan 31, 2012
2,928
$\tiny{17.2.05}$
\begin{align*}\displaystyle
y'' +6y'&=-4xe^{-6x}\\
\end{align*}
$\textrm{So the auxiliary equation is}$
\begin{align*}\displaystyle
r^2+6r&=0\\ r(r+6)&=0\\ r&=0\\ r&=-6
\end{align*}
$\textrm{then}$
\begin{align*}\displaystyle
y_h&=c_1e^{0x}+c_2e^{-6x}=c_1e+c_2e^{-6x}\\
y_p&=Ax^2e^{-6x}+Bxe^{-6x}
\end{align*}
is $y_p$ correct?
 
Last edited:

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
$\tiny{17.2.05}$
\begin{align*}\displaystyle
y'' +6y'&=-4xe^{-6x}\\
\end{align*}
$\textrm{So the auxiliary equation is}$
\begin{align*}\displaystyle
r^2+6r&=0\\ r(r+6)&=0\\ r&=0\\ r&=-6
\end{align*}
$\textrm{then}$
\begin{align*}\displaystyle
y_h&=c_1e^{0x}+c_2e^{-6x}=c_1e+c_2e^{-6x}\\
y_p&=Ax^2e^{-6x}+Bxe^{-6x}
\end{align*}
is $y_p$ correct?
You correctly found the characteristic roots, and so that means the homogeneous solution is:

\(\displaystyle y_h(x)=c_1e^{0x}+c_2e^{-6x}=c_1+c_2e^{-6x}\)

The mistake you made was in using $e^0=e$ when we actually have $e^0=1$ :D

Now, if we were not given the form for the particular solution, we would use:

\(\displaystyle y_p(x)=x^s\left(Ax+B\right)e^{-6x}\)

Since one of the terms of the homogeneous solution is $c_2e^{-6x}$, we need to let $s=1$ so that no term in the particular solution is in the homogeneous solution, and so we have:

\(\displaystyle y_p(x)=x\left(Ax+B\right)e^{-6x}\)

And this is equivalent to what you stated. Now you need to determine $A$ and $B$ using the method of undetermined coefficients.
 

karush

Well-known member
Jan 31, 2012
2,928
\begin{align*}\displaystyle
y_p&=Ax^2e^{-6x}+Bxe^{-6x}\\
G(x)&=-4xe^{-6x}
\end{align*}
So
\begin{align*}\displaystyle
y_p(x)&=Ax^2+Bx+C\\
y_p^{'}& =2Ax+B\\
y_p^{''}& =2A
\end{align*}
substituting into the differential equation
$$(2A)+(2Ax+B)-2(Ax^2+Bx+C)=-4xe^{-6x}$$
got this from an example but ??
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
We have:

\(\displaystyle y_p(x)=x\left(Ax+B\right)e^{-6x}\)

Using the general product rule for differentiation, we may state:

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

And hence:

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

Now, you want to substitute for $y_p''$ and $y_p'$ into the ODE, and then continue with the process of using the method of undetermined coefficients. :D
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775

karush

Well-known member
Jan 31, 2012
2,928
$$(-6Ax^2+2(A-3B)x+B)e^{-6x}+6[2(18Ax^2-6(2A-3B)x+A-6B)e^{-6x}]=-4xe^{-6x}\\
\textrm{expanded}$$
$$210Ae^{-6x}x^2-142Ae^{-6x}x+12Ae^{-6x}+210Be^{-6x}x-71Be^{-6x}
=-4e^{-6x}x$$
$$210Ax^2-142Ax+12A+210Bx-71B=-4x$$
 
Last edited:

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
I mistakenly told you "Yes" when I should have pointed out that you substituted incorrectly (sorry about that :eek:)...you should have:

\(\displaystyle 2\left(18Ax^2-6(2A-3B)x+A-6B\right)e^{-6x}+6\left(\left(-6Ax^2+2(A-3B)x+B\right)e^{-6x}\right)=-4xe^{-6x}\)

Divided through by $4^{-6x}$ since it cannot be zero:

\(\displaystyle 2\left(18Ax^2-6(2A-3B)x+A-6B\right)+6\left(\left(-6Ax^2+2(A-3B)x+B\right)\right)=-4x\)

Arrange both sides in standard form:

\(\displaystyle -12Ax+2A-6B=-4x+0\)

Okay, now what do you get when you equate coefficients?
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
$\displaystyle-12Ax+2A-6B=-4x+0$\\
$\displaystyle x=0$\\
$\displaystyle 2A-6B=0$\\
$\displaystyle x=1$\\
$\displaystyle -12A+2A-6B=0$\\
$\displaystyle -10A-6B=4$
this doesn't look to good!
What you want to do is equate corresponding coefficients, like so:

\(\displaystyle -12A=-4\)

\(\displaystyle 2A-6B=0\)

Now you can uniquely determine $A$ and $B$...:D
 

HallsofIvy

Well-known member
MHB Math Helper
Jan 29, 2012
1,151
When Karush set x= 0, he got the "constant terms", 2A- 6B= 0. When he set x= 1 he got the sum of the constant term and the coefficient of x, -10A- 6B= 4, effectively the same thing. I don't know why he says "this doesn't look too good".

Subtracting the second equation from the first, 12A= -4 so A= -1/3. Then 2A- 6B= -2/3- 6B= 0 so 6B= -2/3 and B= -1/9[FONT=MathJax_Main]−[/FONT][FONT=MathJax_Main]10[/FONT][FONT=MathJax_Math]A[/FONT][FONT=MathJax_Main]−[/FONT][FONT=MathJax_Main]6[/FONT][FONT=MathJax_Math]B[/FONT][FONT=MathJax_Main]=[/FONT][FONT=MathJax_Main]4[FONT=MathJax_Main]−[/FONT][FONT=MathJax_Main]10[/FONT][FONT=MathJax_Math]A[/FONT][FONT=MathJax_Main]−[/FONT][FONT=MathJax_Main]6[/FONT][FONT=MathJax_Math]B[/FONT][FONT=MathJax_Main]=[/FONT][FONT=MathJax_Main]4[/FONT][/FONT]
 

karush

Well-known member
Jan 31, 2012
2,928
updated
$A=\frac{1}{3}$
$B=\frac{1}{9}$
so
$$\displaystyle
y_p=\frac{1}{3}x^2e^{-6x}+\frac{1}{9}x e^{-6x}$$
 
Last edited:

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
I got

$A=-\frac{1}{3}$
$B=-\frac{1}{9}$

i was expecting integers
I got:

\(\displaystyle (A,B)=\left(\frac{1}{3},\frac{1}{9}\right)\)

And so, this would give me:

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

Now, suppose I wish to check my answer, I would then compute:

\(\displaystyle y_p'=\frac{1}{9}(1-18x^2)e^{-6x}\)

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

Now plug into the LHS of the original ODE and simplify to make sure we get the RHS of the original ODE:

\(\displaystyle \frac{2}{3}(18x^2-6x-1)e^{-6x}+6\left(\frac{1}{9}(1-18x^2)e^{-6x}\right)=\frac{2}{3}e^{-6x}\left(18x^2-6x-1+1-18x^2\right)=\frac{2}{3}e^{-6x}\left(-6x\right)=-4xe^{-6x}\quad\checkmark\)

So, we find this particular solution works. Check your algebra to find where you went wrong with the signs. :D
 

karush

Well-known member
Jan 31, 2012
2,928
much mahalo
these are ??? max problems

note
I had to repeatedly log in???
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Here's an alternative approach to working the problem...we are given:

\(\displaystyle y''+6y'=-4xe^{-6x}\)

Let:

\(\displaystyle u=y'\implies u'=y''\)

And we have:

\(\displaystyle u'+6u=-4xe^{-6x}\)

Now, if we multiply through by an integrating factor of:

\(\displaystyle \mu(x)=e^{6x}\)

We obtain:

\(\displaystyle e^{6x}u'+6e^{6x}u=-4x\)

The LHS may now be rewritten as the differentiation of a product:

\(\displaystyle \frac{d}{dx}\left(e^{6x}u\right)=-4x\)

Integrate w.r.t $x$:

\(\displaystyle e^{6x}u=-2x^2+c_1\)

And so we have:

\(\displaystyle u=-2x^2e^{-6x}+c_1e^{-6x}\)

Back-substitute for $u$:

\(\displaystyle y'=-2x^2e^{-6x}+c_1e^{-6x}\)

Integrate w.r.t $x$:

\(\displaystyle y(x)=\int -2x^2e^{-6x}+c_1e^{-6x}\,dx=-2\int x^2e^{-6x}\,dx-\frac{1}{6}c_1e^{-6x}\)

Now, if we note that the factor in the second term of \(\displaystyle -\frac{1}{6}c_1\) is just an arbitrary constant, we may write:

\(\displaystyle y(x)=-2\int x^2e^{-6x}\,dx+c_2e^{-6x}\)

Now, on the remaining integral, let's use IBP, where:

\(\displaystyle u=x^2\implies du=2x\,dx\)

\(\displaystyle dv=e^{-6x}\,dx\implies v=-\frac{1}{6}e^{-6x}\)

And so we have:

\(\displaystyle y(x)=-2\left(-\frac{1}{6}x^2e^{-6x}+\frac{1}{3}\int xe^{-6x}\,dx\right)+c_2e^{-6x}=\frac{1}{3}x^2e^{-6x}-\frac{2}{3}\int xe^{-6x}\,dx+c_2e^{-6x}\)

For the remaining integral, let's use IBP again, where:

\(\displaystyle u=x\implies du=dx\)

\(\displaystyle dv=e^{-6x}\,dx\implies v=-\frac{1}{6}e^{-6x}\)

And so we have:

\(\displaystyle y(x)=\frac{1}{3}x^2e^{-6x}-\frac{2}{3}\left(-\frac{1}{6}xe^{-6x}+\frac{1}{6}\int e^{-6x}\,dx\right)+c_2e^{-6x}=\frac{1}{3}x^2e^{-6x}+\frac{1}{9}xe^{-6x}+\frac{1}{18^2}e^{-6x}+c_1+c_2e^{-6x}\)

\(\displaystyle y(x)=c_1+\left(c_2+\frac{1}{18^2}\right)e^{-6x}+\frac{x}{9}\left(3x+1\right)e^{-6x}\)

Noting that \(\displaystyle \left(c_2+\frac{1}{18^2}\right)\) is still just an arbitrary constant, we may write:

\(\displaystyle y(x)=c_1+c_2e^{-6x}+\frac{x}{9}\left(3x+1\right)e^{-6x}\)

And this is equivalent to the solution obtain through the method of undetermined coefficients (but with a lot more work). :D
 

karush

Well-known member
Jan 31, 2012
2,928
Divided through by $4^{-6x}$ since it cannot be zero:

\(\displaystyle 2\left(18Ax^2-6(2A-3B)x+A-6B\right)+6\left(\left(-6Ax^2+2(A-3B)x+B\right)\right)=-4x\)
did you mean $e^{-6x}$
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775