5. which of the following is the solution to the differential equation \\( \\frac{d y}{d x}=y \\cos x \\)…

5. which of the following is the solution to the differential equation \\( \\frac{d y}{d x}=y \\cos x \\) with the initial condition \\( y\\left(\\frac{\\pi}{2}\\right)=e \\)?\n(a) \\( y=\\cos x+e \\)\n(b) \\( y=e^{\\cos x+1} \\)\n(c) \\( y=e \\cdot \\sin x \\)\n(d) \\( y=e^{\\sin x} \\)

5. which of the following is the solution to the differential equation \\( \\frac{d y}{d x}=y \\cos x \\) with the initial condition \\( y\\left(\\frac{\\pi}{2}\\right)=e \\)?\n(a) \\( y=\\cos x+e \\)\n(b) \\( y=e^{\\cos x+1} \\)\n(c) \\( y=e \\cdot \\sin x \\)\n(d) \\( y=e^{\\sin x} \\)

Answer

Explanation:

Step1: Solve the differential equation

Separate variables: $\frac{dy}{y}=\cos xdx$. Integrate both sides: $\int\frac{dy}{y}=\int\cos xdx$. We get $\ln|y|=\sin x + C$. Exponentiate both sides: $y = e^{\sin x + C}=e^C\cdot e^{\sin x}$.

Step2: Use the initial condition

Given $y(\frac{\pi}{2}) = e$. Substitute $x = \frac{\pi}{2}$ and $y = e$ into $y = e^C\cdot e^{\sin x}$. When $x=\frac{\pi}{2}$, $\sin x = 1$, so $e=e^C\cdot e^1$. Then $e^C = 1$, so $C = 0$.

Answer:

D. $y = e^{\sin x}$