## anonymous 4 years ago Solve u'-a*t*u=sin(t).

1. anonymous

Assume a is a constant and u is a function of t. I'm using an integrating factor (e^((-at^2)/2), which is causing me problems. Specifically, I end up needing to integrate and integral that involves the error function as a solution, which I feel must be wrong.

2. myininaya

Integrating factor is $v=e^{\int\limits_{}^{}-a t dt }=e^{-a \frac{t^2}{2}} \text{ we didn't need the +constant here}$ So we have $e^{-a \frac{t^2}{2}} u'-e^{\frac{-a t^2}{2}} a t u=e^{\frac{-a t^2}{2}} \sin(t)$

3. myininaya

so we can write $(u e^{-a \frac{t^2}{2}})'=e^{-\frac{a t^2}{2}} \sin(t)$

4. myininaya

Now integrate both sides

5. anonymous

This makes sense so far, but I don't know how to integrate the right side. I've tried integrating by parts, but that's not working.

6. anonymous

Well for an equation: $u'(t)+p(t)u(t)=g(t)$ The solution is given by: $u(t)=e^{\int\limits p(t)dt} \int\limits e^{-\int\limits p(t)dt}g(t)dt+Ce^{-\int\limits p(t)dt}$

7. anonymous

If I remember correctly D:

8. myininaya

$u e^{\frac{-a t^2}{2}}=\int\limits_{}^{}e^{\frac{-a t^2}{2}} \sin(t) dt +C$

9. myininaya

so lets look at that part we haven't integrated

10. myininaya

$\int\limits_{}^{}e^{\frac{-a t^2}{2}} \sin(t) dt=e^{\frac{-a t^2}{2}}[-\cos(t)]-\int\limits_{}^{}[-at] e^{\frac{-a t^2}{2}} [-\cos(t)] dt$

11. myininaya

so far I have performed one round on integration by parts

12. anonymous

Okay, so this was integration by parts once?

13. anonymous

And you must integrate by parts again then on the remaining integral?

14. myininaya

$\int\limits_{}^{}e^{-\frac{at^2}{2}} \sin(t) dt=-\cos(t) e^{-\frac{at^2}{2}}-a \int\limits_{}^{} t e^{-\frac{a t^2}{2}} \cos(t) dt$

15. myininaya

i just wanted to clean some stuff up yes we need to do it again lol

16. myininaya

this is nasty looking but yes we need to do it again

17. anonymous

Alright this is making sense, I think I gave up too easy after a single round of integration by parts was looking like it was going nowhere.

18. myininaya

$\int\limits\limits_{}^{}e^{-\frac{at^2}{2}} \sin(t) dt=-\cos(t) e^{-\frac{at^2}{2}}-a \int\limits\limits_{}^{} t e^{-\frac{a t^2}{2}} \cos(t) dt$ $=- \cos(t) e^{-\frac{at^2}{2}}-a[\sin(t) t e^{-\frac{a t^2}{2}}-\int\limits_{}^{}\sin(t)[e^{-\frac{a t^2}{2}}+t (-at )e^{\frac{-a t^2}{2}} ] dt]$

19. myininaya

I'm sorry this getting to messey to do for me on here. I think I will do this on paper and scan it for you.

20. anonymous

Thank you for going through all this work. I might be able to do it myself if it's only one more round of integration by parts.

21. myininaya

no it is not just one more

22. myininaya

this thing looks more beastly to me

23. anonymous

Yeah, it's pretty bad. It's supposed to be ODE review in a PDE class.

24. anonymous

I took ODE's over 2 years ago, so I'm a little rusty. I thought maybe some other method besides integration by parts may work better.

25. myininaya

i'm starting to think this isn't gonna work

26. anonymous

I think it should integrate by some means, since I'm also supposed to sketch several members of the family of solutions to the ODE.

27. anonymous

I don't have a problem sketching solutions, but I think that the integral must go away for me to be able to sketch solutions.

28. myininaya

oh you know what?

29. myininaya

this isn't an elementary integral

30. myininaya

so we can't use our elementary ways

31. myininaya

and that is all i know

32. anonymous

I'm not sure I know of any non-elementary ways to integrate.

33. myininaya
34. anonymous

35. asnaseer

I think you need to use an integrating factor here of:$e^{\int{atdt}}$

36. anonymous

Oh no, the error function again. This is what I originally was running into problems with.

37. myininaya

hey asnaseer thats not where we were having the problem

38. asnaseer

sorry - missed a minus sign

39. myininaya

yes you need that lol

40. myininaya

$\int\limits\limits_{}^{}e^{\frac{-a t^2}{2}} \sin(t) dt=$

41. myininaya

this is the part we got stuck on

42. myininaya

and ike robin says we are getting the error function

43. anonymous

I think this method is typically used for second order ODEs, but could we find the homogeneous and particular solutions?

44. anonymous

I know the result should not involve the error function, sice II need to graph a family of curves, and I don't think the error function can be graphed.

45. asnaseer

ah - ok - I see what you mean now - I've followed through the discusion above. Let me see if there is another approach that can be used here...

46. myininaya

by the way thanks for coming asanaseer

47. asnaseer

np

48. anonymous

Thank you both for helping.

49. asnaseer

yw - I'm off to do some research on this interesting problem - I'll be back if I find a solution

50. anonymous

Good luck, I've been working on this for hours!

51. JamesJ

The integral on the RHS doesn't have an expression in terms of elementary functions. If you want to deal with it all and get it beyond the form $\int e^{-at^2/2} \sin t \ dt \ \ \ \ --(*)$ then write $\sin t = \frac{1}{2i}( e^{it} - e^{-it} )$ complete the square, and you're left with error functions involving complex numbers. I'm not convinced that's a gain. I would probably just leave the integral (*) as it is.

52. asnaseer

yes - I tried that approach as well and ended up with the error function. I was just wondering if there are other approaches to solving equations like this?

53. JamesJ

No, not really. This integral isn't too bad. Part of dealing with ODEs and PDEs is learning what sorts of expressions can and cannot be integrated. This one can't.

54. asnaseer

ok - thx for the clarification - really appreciated.

55. JamesJ

For what it's worth, even if you tried a different technique here such as Laplace transform, when you went to invert the solution, you'd find you had an integral equivalent to this one.

56. asnaseer

Yes - I tried that as well :)

57. anonymous

For anyone who comes across a problem like this in the future, I found a way to solve the differential equation, without having to integrate ∫e−at2/2sint dt. General solution of differential equation = homogenous solution + particular solution. Find homogenous solution: $u'-a*t*u = 0$ This is separable. $du/dt =a*t*u$ $(1/u) du = (a*t) dt$ $\int\limits_{}^{}(1/u) du = \int\limits_{}^{} (at) dt$ $\ln \left| u \right|+c = (1/2) a *t^{2}+c$ $\left| u \right|=\exp((1/2)a*t ^{2}) + c$ $u=\pm\exp((1/2)a*t ^{2}) + c$ Find the particular solution, using undetermined coefficients: $p(t) = A \sin t + B \cos t$ $p'(t) = A \cos t - B \sin t$ $u'-a*t*u = \sin t$ $A \cos t - B \sin t - a * t* (A \sin t + B \cos t) = \sin t$ Group like terms and factor to get system of equations: $A - a*t*B = 0$ $-B - a*t*A =1$ Solve for A and B. $A = (at)/(1-a ^{2}t ^{2})$ $B = 1/ (1-a ^{2}t ^{2}$ Plug back A and B into particular solution, add homogenous solution to get final solution. $u =\pm e^{(1/2)at ^{2}} +(at)/(1-a ^{2}t ^{2})(\sin t) + 1/(1-a ^{2}t ^{2})(\cos t)+c$ Please correct any mistakes I made.

58. JamesJ

No, that's definitely not right because (a) this solution doesn't satisfy the differential equation (b) it falls apart when take the derivative. If the coefficients A and B are functions of t, then they must have non zero derivative, vs. the way you treat them above when you write down p'(t)

59. anonymous

Ah, I wasn't sure if undetermined coefficients would work or not in this case. I see why it doesn't work now. Is there another way to find the particular solution then without using undetermined coefficients?