Welcome to our community

Be a part of something great, join today!

[SOLVED] 2.2.7 de with trig and y(1)=1


Well-known member
Jan 31, 2012
\textit {Given }\\
&y'+(\cot x)y&=2 \csc x \qquad y(\pi/2)=1 &_{(1)}\\
\textit {Find u(x) }\\
&\displaystyle u(x)&=\exp\int \cot x \, dx\\
&&\displaystyle=\sin{x} &_{(2)}\\
\textit{multiply thru w/ $\sin x$} \\
&\sin x y' +\cos x y&=1 &_{(3)}\\
&(\sin{x} y)'&=1 &_{(4)}\\
\textit{Integrate }\\
&\displaystyle \sin{x} y
&=\displaystyle\int \, dx\\
&&=x+c &_{(5)}\\
\textit{divide thru by $\sin{x}$}\\
&\displaystyle y
&=x\csc x+\displaystyle\frac{c}{\sin x} &_{(6)}\\
\textit{So if }\\
&\displaystyle y(\pi/2)
% +\displaystyle\frac{c}{\sin \frac{\pi}{2}}=1\\
\\ \\
&&c=\displaystyle 1-\frac{\pi}{2} &_{(7)}\\
\textit{finally W|A says}\\
%\quad 0<x<\pi}
&y&=\color{red}{\displaystyle y c_1 \csc{x}
+ 2 x \csc{x},
\quad 0<x<\pi} &_{(8)}\\

ok I didnt quite get the last 3 steps red is W|A answer


Staff member
Feb 24, 2012
When you multiply through by $\mu(x)$, you should have:

\(\displaystyle \frac{d}{dx}(\sin(x)y)=2\)

And then integrate:

\(\displaystyle \sin(x)y=2x+c_1\)

\(\displaystyle y(x)=2x\csc(x)+c_1\csc(x)\)

Determine parameter from initial values

\(\displaystyle y\left(\frac{\pi}{2}\right)=2\left(\frac{\pi}{2}\right)\csc\left(\frac{\pi}{2}\right)+c_1\csc\left(\frac{\pi}{2}\right)=\pi+c_1=1\implies c_1=1-\pi\)

And so the solution to the IVP is:

\(\displaystyle y(x)=2x\csc(x)+(1-\pi)\csc(x)=(2x+1-\pi)\csc(x)\)

This is equivalent to what W|A returns for me. In the original ODE, we have:

\(\displaystyle x\ne\pi k\) where \(\displaystyle k\in\mathbb{Z}\)

And we find the initial value is in the interval:

\(\displaystyle 0<x<\pi\)


Well-known member
Jan 31, 2012
mega mahalo again

I probably would have made if carried the 2 thru