Solving a differential equation

hardatwork
Messages
9
Reaction score
0

Homework Statement


Find the particular solution of the differential equation
\frac{dy}{dx}+ycos(x)=3cos(x)


Homework Equations



y(0)=5

The Attempt at a Solution


\frac{dy}{dx}=3cos(x)-ycos(x)
\frac{dy}{dx}=(cos(x))(3-y)
\int \frac{dy}{3-y}=\int cos(x) dx
-ln|3-y|=sin(x)+C
ln|3-y|=-sin(x)-C

to find C, I did
ln|3-5|=-sin(0)-C
ln|-2|=-C
C=-ln|2|
So the equation is
3-y=e(-sin(x)+ln|2|)
-y=e(-sin(x)+ln|2|)-3
y=-e(-sin(x)+ln|2|)+3
But this is incorrect. I'm not sure if my setup is right or if I made a mistake. I would greatly appreciate if someone could see were I went wrong.
 
Physics news on Phys.org
Your steps and your solution have no flaws. However, you can simplify your solution further. Also, it is not necessary to continue using the absolute value signs when the argument is positive.
 
How would I simplify futher?
 
hardatwork said:
How would I simplify futher?

Remember that a^{b+c} = a^ba^c and that the exponential function is the inverse function of the natural logarithm.
 
Oh! Okay that makes. Thank You so much!
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top