Ordinary Differential Equation Problem

Click For Summary

Homework Help Overview

The discussion revolves around solving an ordinary differential equation of the form dy/dx = 4e^(-x)cos(x). Participants are exploring integration techniques, particularly integration by parts, to find a solution.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the use of integration by parts and the potential for sign errors in the calculations. There are suggestions to reconsider how terms are combined and simplified, particularly regarding the final expression for y.

Discussion Status

Several participants are actively engaging with the original poster's approach, questioning specific steps and suggesting alternative methods. There is a focus on clarifying the relationship between terms derived from integration and the original differential equation. Some guidance has been provided regarding how to manipulate the equation to isolate y.

Contextual Notes

Participants note the importance of careful handling of constants during integration and the potential for confusion when integrating by parts multiple times. There is an acknowledgment of the original poster's undergraduate status, which may contribute to misunderstandings in the integration process.

Mark Brewer
Messages
38
Reaction score
4

Homework Statement



dy/dx = 4e-xcosx

The Attempt at a Solution


[/B]
I've divided dx to both sides, and now have dy = 4e-xcosx dx
I've then started to use intergration by parts to the right side with u = 4e-x and dv = cosx dx
Leaving y = 4e-xsinx - ∫ -4e-xsinx dx
Once again I used intergration by parts with u = -4e-x and dv = sinx dx
Leaving y = 4e-xsinx - (4e-xcosx - ∫ -4e-xcosx dx)
I know that I don't need to integrate again, so my final answer is 4e-x(sinx - cosx) + c

The correct answer is 2e-x(sinx - cosx) + c

Where am I missing division by 2?

Cheers,

Mark
 
Physics news on Phys.org
Look at the equation you got: ##y = 4e^{-x}\sin x - \big(4e^{-x}\cos x - \int( -4e^{-x}\cos x dx)\big)##. That looks correct to me.

That is not the same as ##y = 4e^{-x}\sin x - (4e^{-x}\cos x)##, which is your final answer (ignoring the constant). You've dropped the last term without justification.

But hang on, doesn't that last term remind you of something? Can you get rid of it by replacing it by that thing and moving it somewhere else in the equation?
 
Last edited:
I think you have made a mistake in some of your +ve/-ve signs and think that your approach would eventually give y = y.

The best way to go about this is to write cosx =(exp(ix) + exp(-ix))/2 (Euler's formula) and then you have to solve a differential equation of the form

dy/dx = exp(mx) where m = (1+/- i).

This is relatively straight forward to solve.
 
This not so much a "differential equations" problem (though it is disguised as one), it is just an "integration by parts exercise".

Yes, you can integrate 4\int e^{-x}cos(x)dx by parts. Let u= e^{-x}, so that du= -e^{-x}dx and let dv= cos(x)dx so that v= sin(x). Then 4\int e^{-x}cos(x)dx= 4\left(e^{-x}sin(x)- \int e^{-x}sin(x)dx\right). Do that resulting integral by parts. Let u= e^{-x} so that du= -e^{-x}du and let dv= sin(x) so that dv= -cos(x)dx.

Now, we have 4\int e^{-x}cos(x)dx= 4e^{-x}sin(x)- 4e^{-x}cos(x)- 4\int e^{-x}cos(x)dx.

Now,as andrewkirk suggested (or hinted, rather), we have 4\int e^{-x}cos(x)dx on both sides of the equation. Solve your equation for that and you are done.
 
Last edited by a moderator:
Summarizing a generous contribution by HallsofIvy ...

An explanation hinges on how you managed to go from this line:
Leaving y = 4e-xsinx - (4e-xcosx - ∫ -4e-xcosx dx)
to this line:
so my final answer is 4e-x(sinx - cosx) + c
Can you explain your intermediate step here?
 
Mark Brewer said:

Homework Statement



dy/dx = 4e-xcosx

The Attempt at a Solution


[/B]
I've divided dx to both sides, and now have dy = 4e-xcosx dx
I've then started to use intergration by parts to the right side with u = 4e-x and dv = cosx dx
Leaving y = 4e-xsinx - ∫ -4e-xsinx dx
Once again I used intergration by parts with u = -4e-x and dv = sinx dx
Leaving y = 4e-xsinx - (4e-xcosx - ∫ -4e-xcosx dx)
I know that I don't need to integrate again, so my final answer is 4e-x(sinx - cosx) + c

The correct answer is 2e-x(sinx - cosx) + c

Where am I missing division by 2?

Cheers,

Mark

In cases like this one it is almost always easier to do the problem by first eliminating the pesky multiplicative constant. So, first do the integral ##\int e^{-x} \cos(x) \, dx##, then multiply by 4 at the very end. Basically, if ##f(x) = 4 g(x)##, then ##\int f(x) \, dx = 4 G(x)##, where ##G(x) = \int g(x) \, dx##. That also helps you to keep straight where the various factors come and go, so that you know when a '2' appears in the final answer, it is '4/2' rather than ##\sqrt{4}##, for example.
 
  • Like
Likes   Reactions: Mark Brewer
NascentOxygen said:
Summarizing a generous contribution by HallsofIvy ...

An explanation hinges on how you managed to go from this line:
to this line:
Can you explain your intermediate step here?

I noticed the problem was going to continue as long as I would like to integrate by parts. If I recall from calc doing to steps of integration by parts was sufficient to ignore the remaining integral. I understand I'm an undergraduate so my mistakes are likely to exist. I do take criticism well, so please feel free to tell me I'm wrong, and I the practice I learned is incorrect.
 
andrewkirk said:
Look at the equation you got: ##y = 4e^{-x}\sin x - \big(4e^{-x}\cos x - \int( -4e^{-x}\cos x dx)\big)##. That looks correct to me.

That is not the same as ##y = 4e^{-x}\sin x - (4e^{-x}\cos x)##, which is your final answer (ignoring the constant). You've dropped the last term without justification.

But hang on, doesn't that last term remind you of something? Can you get rid of it by replacing it by that thing and moving it somewhere else in the equation?
Hi Andrew, I'm some what following your explanation, but I need a little more details. I recognize that the last term 4e-xcosx reminds me of dy/dx. A little help is appreciated.
 
Mark Brewer said:
I recognize that the last term 4e-xcosx reminds me of dy/dx
Right, in fact they are equal, and that means that ##y=\int 4e^{-x}\cos x dx##. So, substituting ##-y## for that last term gives you an equation with ##y## on both sides, and no more integrals to be done. How will you turn that into an equation of the form ##y=##<something not involving ##y##>?
 
  • #10
andrewkirk said:
Right, in fact they are equal, and that means that ##y=\int 4e^{-x}\cos x dx##. So, substituting ##-y## for that last term gives you an equation with ##y## on both sides, and no more integrals to be done. How will you turn that into an equation of the form ##y=##<something not involving ##y##>?

Thank you Andrew. Substituting -y then gave me the chance to add y to both sides and then divide by 2. Thank you once again.

Mark
 
  • #11
Mark Brewer said:
If I recall from calc doing to steps of integration by parts was sufficient to ignore the remaining integral.
Such a "rule" doesn't ring a bell with me. But I think you now see how the problem at hand can be concluded, without reliance on anything but algebra.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
743
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
3K
Replies
3
Views
2K
  • · Replies 25 ·
Replies
25
Views
2K