Third order non-homogenous diff-eq w/ constant coefficients: y''' - y'' + y' - y = cos(x) + 2e^x

Ognjen

New member
Joined
Jan 4, 2022
Messages
46
The particular problem I have in mind is the following:

[math]y''' - y'' + y' - y = cosx + 2e^x[/math]
I know the general way of solving non-homogenous differential equations of higher orders with constant coefficients.

First, we are supposed to define it's analogous homogenous equation, then it's characteristic equation based on its homogenous equation, in the following way:

[math]a^3 - a^2 + a - 1 = 0[/math]
Then, I find roots of this equation, which end up being a1 = 1, a2 = i and a3 = -i.

Based on this, I define the general solution of the homogenous equation, being the following:

[math]y = C_1e^x + C_2cosx + C_3sinx[/math]
with C_1, C_2 and C_3 being real numbers.

The functions preceded by the C constants I gathered from the rule of solving homogenous linear differential equations with constant coefficients. Basically, for a being a prime real root of the characteristic equation, the particular solution is in the form y = e^(ax). For complex roots in the form a = m + ni and a_1 = m - ni, the particular solutions are in the form y1 = e^(mx)cosnx, y2 = e^(mx)sinnx, y3 = xe^(mx)cosnx, y4 = xe^(mx)sinnx...... y(2k-1) = x^(k-1)e^(mx)cosnx, y2k = x^(k-1)e^(mx)sinnx. Then, I acquired the general solution by simply multiplying each particular solution with a C constant and getting a sum of them.

Then, I'm supposed to find F1(x) and F2(x) (and more if present) based on the terms on the right hand side of the non-homogenous starting equation that have the term e^(ax) within them (as far as I know).

So, in my particular problem, I have F1(x) = cosx, and F2(x) = 2e^x. (Correct me if I'm wrong)

Based on the rule for solving non-homogenous constant-coefficient DE, I determine a = 0, and b = 1 for the first equation, and s as the exponent on which to raise an x term in the upcoming solution to the particular equation number one. s ends up being the ''order'' of the root of the characteristic equation that equals the number which is not 0 ( so number b in this case, which is 1). One is the root of the first order of the characteristic equation, so s = 1. The equation into which I am putting a, b and s is the following:

[math]y_p = x^se^(ax)*(P(x)cosbx + Q(x)sinbx)[/math]
So, based on the preceding values of a, b and s, my y_p1 looks like the following:

[math]y_p1 = xcosx[/math]
For F2(x), I simply repeat the steps I followed for F1(x), and get that a = 1, b = 0, s = 1, and thus y_p2 ends up looking like this:

[math]y_p2 = 2xe^x[/math]
Thus, my particular solution for the non-homogenous equation ends up being the sum of y_p1 and y_p2, which is:

[math]y_p = xcosx + 2xe^x[/math]
The general solution of the non-homogenous is, by definition, just the sum of the particular solution of the non-homogenous differential equation and the general solution of the homogenous DE, so I won't write it, because the official solution agrees with my solution for the homogenous equation.

However, the official solution says the particular non-homogenous equation is the following:

[math]y_p = -xcosx/4 - xsinx/4 + xe^x[/math]
How did they get this?

DISCLAIMER: I do know that, in case I had a polynomial function as my Q_n(x) within my F_n(x), I would have to write it in the general way (if I had, for example F_1(x) = (24x^2 - 4)e^x, I would have a = 1, b = 0, and y_p1 = x^s * e*x(Ax^2 + Bx + C). However, I do not know how to write the ''general formula'' which to plug into the non-homogenous equation to get the coefficients I need when the function I have for Q(x) within F(x) is not polynomial. In my case, they're either a ''constant'' ( 2e^x, so Q(x) is just 2) or a trigonometric function (what's the general way to write cos(x) ??).

Thank you in advance.
 
So, in my particular problem, I have F1(x) = cosx, and F2(x) = 2e^x. (Correct me if I'm wrong)
What are F1 and F2 ? If you are referring to a particular method in your textbook you need to remember that other readers might not have access to it. You might consider either defining the terms in your posts or, alternately, using some online resources (Wikipedia, Wolfram, etc.) for reference.
Based on the rule for solving non-homogenous constant-coefficient DE, I determine a = 0, and b = 1
What are a and b ? Is [imath]a[/imath] the same as the above (in which case [imath]a[/imath] is 1, i or -i.
and s as the exponent on which to raise an x term in the upcoming solution to the particular equation number one. s ends up being the ''order'' of the root of the characteristic equation that equals the number which is not 0 ( so number b in this case, which is 1).
Personally I find reading math formulae easier than verbal descriptions.

What if you tried [imath]y_p (x) = fx\cos x + gx\sin x + hx e^x[/imath] and see if you can solve it for [imath]f,g,h[/imath] ?
 
What are F1 and F2 ? If you are referring to a particular method in your textbook you need to remember that other readers might not have access to it. You might consider either defining the terms in your posts or, alternately, using some online resources (Wikipedia, Wolfram, etc.) for reference.

What are a and b ? Is [imath]a[/imath] the same as the above (in which case [imath]a[/imath] is 1, i or -i.

Personally I find reading math formulae easier than verbal descriptions.

What if you tried [imath]y_p (x) = fx\cos x + gx\sin x + hx e^x[/imath] and see if you can solve it for [imath]f,g,h[/imath] ?
I am so sorry, I thought people here would be familiar with the ''formal way of doing this type of problems''. I really have no legible resources available, only badly written scribbles from my notebook, in another language...

How would you solve this equation, regardless of what I wrote below the original equation as my way of solving it?

I don't understand why you proposed such equation for y_p(x), and neither would I be able to solve it for f, g and h... I'm sorry.
 
I thought people here would be familiar with the ''formal way of doing this type of problems''.
Not me :(
I don't understand why you proposed such equation for y_p(x), and neither would I be able to solve it for f, g and h... I'm sorry.
Kind of intuitive approach partially based on what you've posted. I could probably use general polynomials, like you do, instead of [imath]fx, gx, hx[/imath], but the end result, I suspect, would be the same. I've plugged my expression for [imath]y_p[/imath] into the differential equation and obtained (regular) equations for coefficients [imath]f,g,h[/imath]. Solving the resulting equation gave me the same answer as the one you posted.

P.S. Actually, I cheated: I asked SymPy to do the plugging.
 
I will show you how they got \(\displaystyle y_p\)

First, find the solution of the homogenous equation.

\(\displaystyle y'''(x)-y''(x)+y'(x)-y(x) = 0\)

You and me agree that the solution is:

\(\displaystyle y(x) = c_1\cos x + c_2\sin x + c_3e^x \)

Now, we look for a solution of the form:

\(\displaystyle y_p(x) = A\cos x + B\sin x + Ce^x\) because we have on the right side of the inhomogeneous equation \(\displaystyle \cos x + 2e^x\)

After guessing the particular solution, \(\displaystyle y_p\), go back to the solution of the homogeneous equation. Compare betwen them. Any same functions that are available in both solutions must be multiplied by \(\displaystyle x\). By coincidence, all of them, \(\displaystyle \cos x\), \(\displaystyle \sin x\), and \(\displaystyle e^x\), are available in the homogeneous equation.

Then, we have to multiply all of them by \(\displaystyle x\).

Now, we have the correct form of the particular solution.

\(\displaystyle y_p(x) = Ax\cos x + Bx\sin x + Cxe^x\)

Once you found the correct form of the particular solution, you would be able to find the constants, \(\displaystyle A\), \(\displaystyle B\), and \(\displaystyle C\).
It is possible but tedious to find all the constants by hand. For speed, we will let a machine to find them. (You can always find them by yourself if you have a free time.)

\(\displaystyle A = \frac{-1}{4}\)

\(\displaystyle B = \frac{-1}{4}\)

\(\displaystyle C = 1\)

One final thing. Let us assume that the homogenous solution does not include the function \(\displaystyle c_1e^x\).

Then, the correct form of the particular solution will be:

\(\displaystyle y_p(x) = Ax\cos x + Bx\sin x + Ce^x\)

I think that now you got the idea that you were looking for, hopefully.
 
Top