I have
xy' - 3y = x^4(e^x + cos x) - 2x^2 ; y(pi) = e^pi + (2/pi).
Could someone solve this out for me?
Thank you.
By linear, he means an equation of the form $\displaystyle y'+p(x)y = q(x)$. But that's easy:
$\displaystyle y' - \frac{3}{x}y = x^3(e^x + \cos {x}) - 2x$
Now, how do you solve a first-order linear equation?
- Hollywood
Multiply the equation in standard linear form by this integrating factor. You should then find the left-hand side can be expressed as the derivative of a product.
The equation in standard linear form:
$\displaystyle \frac{dy}{dx}-\frac{3}{x}y=x^3(e^x+\cos(x))-2x$
Now, multiply through by $\displaystyle \mu(x)=\frac{1}{x^3}$
$\displaystyle \frac{1}{x^3}\cdot\frac{dy}{dx}-\frac{3}{x^4}y=e^x+\cos(x)-\frac{2}{x^2}$
Rewrite the left side as the derivative of a product:
$\displaystyle \frac{d}{dx}\left(\frac{1}{x^3}\cdot y \right)=e^x+\cos(x)-\frac{2}{x^2}$
Now, integrate with respect to $\displaystyle x$.
If the integrating factor is calculated correctly, you should always get the left side to be the derivative of the product of the integrating factor and the dependent variable.
Observe that:
$\displaystyle \frac{d}{dx}\left(\frac{1}{x^3}\cdot y \right)=\frac{1}{x^3}\cdot\frac{dy}{dx}-\frac{3}{x^4}y$
Your textbook should give you a development of this method which will demonstrate why this always works.
On a side note, I highly recommend that you do not use the character "x" to denote multiplication, as it can be confused with the variable $\displaystyle x$.
I integrated the right side respect to x then i got
y/x^3 = e^x + cos x - 2/x + c
Then I multiplied x^3 to both side getting
y= x^3 e^x + x^3 sin x + 2/x^2 + c/x^3
Am I right so far? because I have this equation y(pi) = e^pi + (2/pi)
But I tried and it does not seem to work
You have integrated the trigonometric term on the right incorrectly (wait, I see you changed it in the second line), so not counting you first line, what you have done incorrectly is you have integrated the rational term incorrectly and divided the parameter (constant of integration) by x^3 rather than multiplied. So, what you should have is the general solution:
$\displaystyle y(x)=x^3\left(e^x+\sin(x)+\frac{2}{x}+c \right)$
Now, use the given initial condition to determine $\displaystyle c$.
Hello so I got this equation
e^pi + 2/pi = pi^3 e^pi + 2pi^2 +Cpi^3 from y(pi) = e^pi + 2/pi
I tried moving everything to left leaving Cpi^3 on the right. But I find that the equation gets very messy? Is it supposed to be like that?