151k views
5 votes
Xy ′ +3y= x cos(x) ​ ,y(π)=0

User Micka
by
7.5k points

1 Answer

0 votes

Final Answer:

The solution to the given initial value problem is
\( y(x) = (1)/(4)x\sin(x) - (1)/(2)\cos(x) + (1)/(4)x\cos(x) \).

Step-by-step explanation:

The given differential equation is a linear first-order ordinary differential equation (ODE) with an initial condition. To solve it, we can use the method of integrating factors. First, rearrange the equation to the standard form
\( y' + P(x)y = Q(x) \), where
\( P(x) \) and
\( Q(x) \) are functions of
\( x \). In this case,
\( P(x) = 3 \) and \( Q(x) = x\cos(x) \).

The integrating factor
\( \mu(x) \) is found by exponentiating the integral of
\( P(x) \), which gives
\( \mu(x) = e^(\int 3 \,dx) = e^(3x) \). Multiply both sides of the differential equation by
\( \mu(x) \) to obtain the exact differential form
\( e^(3x)y' + 3e^(3x)y = xe^(3x)\cos(x) \).

The left side is now the result of the product rule, and by applying it in reverse (integrating), we find
\( e^(3x)y = (1)/(4)xe^(3x)\sin(x) - (1)/(2)e^(3x)\cos(x) + C \), where
\( C \) is the constant of integration.

Finally, solve for
\( y \) and apply the initial condition
\( y(\pi) = 0 \) to determine the value of the constant
\( C \), yielding the final solution.

User Santiago Rebella
by
8.0k points