Is solving differential equations supposed to be this hard?

In summary: Your ##y_p## also looks fine now that the ##y_c## is confirmed.You seem to be making solving the coefficients from your guess for the particular solution unnecessarily difficult. It's a bit messy, but why on Earth are you expanding all those terms instead of collecting those with the same coefficients together?To solve for the coefficients of ##y_p##, you can use the substitution y'(x)=((B+2Ax+Bx)\cos(2x)+(A-2Bx+Ax)\sin(2x))e^x,\quad y''(x)=((4A(x+1)+B(2-3x))\cos(2x
  • #1
Turion
145
2

Homework Statement



$$y''-2y'+5y={ e }^{ x }cos2x$$

Homework Equations





The Attempt at a Solution



I still haven't completed the question but I just want to know if I'm on the right track. It's becoming ridiculously tiring to just complete 1 question.

Is it supposed to be this long?
 

Attachments

  • IMG_20130911_091524.jpg
    IMG_20130911_091524.jpg
    35.9 KB · Views: 426
Physics news on Phys.org
  • #2
There are many different methods to solving differential equations, you may or may not have learned very many of them at this point.

What method are you using right now?
 
  • #3
Jesse H. said:
There are many different methods to solving differential equations, you may or may not have learned very many of them at this point.

What method are you using right now?

I am currently using the method of undetermined coefficients.

First I solve the homogeneous version of the differential equation to get the complementary solution. Then I guess the form of the particular solution and try to find the unknowns.
 
  • #4
Turion said:

Homework Statement



$$y''-2y'+5y={ e }^{ x }cos2x$$

Homework Equations





The Attempt at a Solution



I still haven't completed the question but I just want to know if I'm on the right track. It's becoming ridiculously tiring to just complete 1 question.

Is it supposed to be this long?

Your homogeneous solution ##y_c## looks wrong. Where did the roots of the characteristic equation go?

Also, your guess for the particular solution ##y_p## is also incorrect slightly. Why do you have an ##x## in there? I don't see any polynomial terms in ##e^{ x }cos2x##?
 
  • #5
If this is a textbook problem, I can't imagine it being that horrible. Are you specific told to do undetermined coefficients? If not I'd try other methods and see if they work any better.
 
  • #6
Zondrina said:
Your homogeneous solution ##y_c## looks wrong. Where did the roots of the characteristic equation go?

I used the following to get the complementary solution:
$${ m }_{ 1 }=α+iβ\quad \quad { m }_{ 2 }=α-iβ\\ y={ e }^{ αx }({ c }_{ 1 }cosβx+{ c }_{ 2 }sinβx)$$

Zondrina said:
Also, your guess for the particular solution ##y_p## is also incorrect slightly. Why do you have an ##x## in there? I don't see any polynomial terms in ##e^{ x }cos2x##?

##e^{ x }cos2x## is already in the complementary solution so I have to multiply the particular solution by x:
$${ y }_{ c }={ c }_{ 1 }{ e }^{ x }cos2x+{ c }_{ 2 }{ e }^{ x }sin2x$$
 
  • #7
Jesse H. said:
If this is a textbook problem, I can't imagine it being that horrible. Are you specific told to do undetermined coefficients? If not I'd try other methods and see if they work any better.

Yes unfortunately and it is a textbook problem.

This is torture...
 
  • #8
Turion said:
I used the following to get the complementary solution:
$${ m }_{ 1 }=α+iβ\quad \quad { m }_{ 2 }=α-iβ\\ y={ e }^{ αx }({ c }_{ 1 }cosβx+{ c }_{ 2 }sinβx)$$



##e^{ x }cos2x## is already in the complementary solution so I have to multiply the particular solution by x:
$${ y }_{ c }={ c }_{ 1 }{ e }^{ x }cos2x+{ c }_{ 2 }{ e }^{ x }sin2x$$

Ah yes, I see what you did for ##y_c## now. My Euler formula is a bit rusty lol.

Your ##y_p## also looks fine now that the ##y_c## is confirmed.
 
  • #9
You seem to be making solving the coefficients from your guess for the particular solution unnecessarily difficult. It's a bit messy, but why on Earth are you expanding all those terms instead of collecting those with the same coefficients together?

[tex]y(x)=(Bx\cos(2x)+Ax\sin(2x))e^x,\quad y'(x)=((B+2Ax+Bx)\cos(2x)+(A-2Bx+Ax)\sin(2x))e^x,\quad[/tex]
[tex]y''(x)=((4A(x+1)+B(2-3x))\cos(2x)-(A(3x-2)+4B(x+1))\sin(2x))e^x[/tex]

You substitute and divide by ex to get
[tex](4A(x+1)+B(2-3x)-2(B+2Ax+Bx)+5Bx)\cos(2x)=\cos(2x)[/tex]
and
[tex](-A(3x-2)-4B(x+1)-2(A-2Bx+Ax)+5Ax)\sin(2x)=0[/tex]

(sine and cosine are independent) This has to hold for any x, so the coefficients must be the same – The sine term has to vanish, and the coefficient of the cosine term has to be one, so

[tex](4A(x+1)+B(2-3x)-2(B+2Ax+Bx)+5Bx)=1[/tex]
and
[tex](-A(3x-2)-4B(x+1)-2(A-2Bx+Ax)+5Ax)=0[/tex]You get B easily from the second one (again, it has to hold for any x, just simplify) and then A from the first one. Can you take it from here?
 
  • #10
Hint: The equation has real coefficients. Thus you can instead look at the right-hand side in the form
[tex]\mathrm{Re}[\exp x \exp(2 \mathrm{i} x)]=\mathrm{Re} \exp[x(1+2 \mathrm{i})].[/tex]
Then you can first solve for the equation without the "Re" on the righthand side and then take the real part of the solution (you should, of course think about, why that's ok here too!).

As you'll see, the task to find a particular solution for the inhomogeneous equation becomes a bit simpler in this way.
 
  • #11
@DeIdeal: I don't understand how you went from y(x) to y'(x). Are you just omitting some steps or did you do all that in 1 step?
 
  • #12
Turion said:
@DeIdeal: I don't understand how you went from y(x) to y'(x). Are you just omitting some steps or did you do all that in 1 step?

Well, yeah, obviously you could write out some more terms, but it's just straight-forward differentation:

By the product rule

[tex]\frac{\mathrm{d}}{\mathrm{dx}}(B\cos(2x)+A\sin(2x))xe^x=(\frac{\mathrm{d}}{\mathrm{dx}}(B\cos(2x)+A\sin(2x)))xe^x+(B\cos(2x)+A\sin(2x))\frac{ \mathrm {d}}{\mathrm{dx}}xe^x.[/tex]

The first term is done with the derivatives of cosine and sine and the chain rule for "(2x)", product rule is again used for the second one, as well as the derivative of x and ex:

[tex]=(-2B\sin(2x)+2A\cos(2x))xe^x+(B\cos(2x)+A\sin(2x))(x\frac{ \mathrm {d}}{\mathrm{dx}}e^x+e^x\frac{ \mathrm {d}}{\mathrm{dx}}x)[/tex]
[tex]=(-2B\sin(2x)+2A\cos(2x))xe^x+(B\cos(2x)+A\sin(2x))(x+1)e^x[/tex]

Then it's just rearranging

[tex]=(-2B\sin(2x)+A(x+1)\sin(2x)+2A\cos(2x)+B(x+1)\cos(2x))e^x[/tex]
[tex]=((B+2A+Bx)\cos(2x)+(A-2B+Ax))\sin(2x))e^x[/tex]

Were you able to follow this better? I don't know, to me it just seems more confusing to write out all the terms explicitly like this, it feels like it's easier to see "what's going on" from the more concise expression.

----

And you can quite easily figure out the derivative from initial expression in your head. This is how I did it for, I don't know, a "symmetric" function like this: the ex will remain in the final expression. You have a linear combination of the "same" ("2x") sine and cosine, so the final answer will have them as well, and then there's only the x to worry about, which will differentiate to one or stay the same, so you have a 1st-order polynomial coefficient multiplying the sine and cosine, something of the form (Psin(2x)+Qcos(2x))ex. The "xex"-part differentiates to give the coefficient (x+1) times Bcos(2x) or Asin(2x), while the cosines and sines differentiate to each other, so you'll get 2Bsin(2x) and 2Bcos(2x) and you'll just have to check the signs.

It looks really complicated when I type it out like this, but it's really quite quick to do, a lot quicker than doing it step by step.

(Of course, I checked that everything was correct with Wolfram before posting :P)
 
  • #13
Sweet. I solved it. Factoring the terms like you said reduced the 6-line juggernaut shown in the image I posted to only 2 lines.

Thanks.
 
  • #14
Great, I'm glad I could help. :]
 

What are differential equations?

Differential equations are mathematical equations that describe the relationship between a function and its derivatives. They are often used to model physical phenomena in science and engineering.

Why are differential equations important?

Differential equations are important because they allow us to understand and predict the behavior of complex systems, such as those found in physics, biology, and economics. They are also used in engineering to design and control systems.

Is solving differential equations supposed to be difficult?

Solving differential equations can be difficult because they involve complex mathematical concepts and techniques. However, with practice and a solid understanding of the underlying principles, they can become easier to solve.

What are some strategies for solving differential equations?

Some strategies for solving differential equations include using separation of variables, substitution, and integrating factors. It is also important to have a good understanding of the properties of different types of differential equations, such as linear and nonlinear equations.

How can I improve my skills in solving differential equations?

To improve your skills in solving differential equations, it is important to practice and work through various examples and exercises. It can also be helpful to seek guidance from a teacher or tutor, and to develop a strong foundation in calculus and other mathematical concepts.

Similar threads

  • Calculus and Beyond Homework Help
Replies
0
Views
138
  • Calculus and Beyond Homework Help
Replies
2
Views
92
  • Calculus and Beyond Homework Help
Replies
18
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
662
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
294
  • Calculus and Beyond Homework Help
Replies
7
Views
674
Replies
7
Views
514
  • Calculus and Beyond Homework Help
Replies
4
Views
931
Back
Top