How can I solve the differential equation #y'= sinx - xsinx# ?
2 Answers
General solution for your differential equation is:
Explanation:
.
To find
The argument of the integral is product of two functions. As such, we will use integration by parts:
Let's plug it in:
This is the solution to the differential equation in your problem statement.
The General Solution is:
# y = xcosx - sinx -cosx + C#
Explanation:
We have:
# y' = sinx-xsinx #
Using Leibniz's Notation we can write this as:
# dy/dx = sinx-xsinx #
Which is a First Order Ordinary Differential Equation, so we can "separate the variables" to get:
# int \ dy = int \ sinx-xsinx \ dx #
Leading to:
# y = int \ sinx \ dx - int \ xsinx \ dx + C#
The first integral is trivial, and we require Integration By Parts for the Second integral, as follows:
Let
# { (u,=x, => (du)/dx,=1), ((dv)/dx,=sin x, => v,=-cosz ) :}#
Then plugging into the IBP formula:
# int \ (u)((dv)/dx) \ dx = (u)(v) - int \ (v)((du)/dx) \ dx #
We have:
# int \ (x)(sinx) \ dx = (x)(-cosx) - int \ (-cosx)(1) \ dx #
# :. int \ xsinx \ dx = -xcosx + sinx #
Using this result we return to the DE solution to get:
# y = -cosx - {-xcosx + sinx}+ C#
# \ \ = -cosx + xcosx - sinx+ C#
# \ \ = xcosx - sinx -cosx + C#
Which is the General Solution.