2.2.8 de xy'+2y=sin x,y(pi)=1/pi find solution

  • Context: MHB 
  • Thread starter Thread starter karush
  • Start date Start date
Click For Summary
SUMMARY

The solution to the initial value problem defined by the differential equation \(xy' + 2y = \sin x\) with the condition \(y(\pi) = \frac{1}{\pi}\) is \(y = \frac{\sin x - x \cos x}{x^2}\) for \(x > 0\). The integration process involved rewriting the equation, finding the integrating factor \(u(x) = x^2\), and integrating the right-hand side correctly as \(x \sin x\). The constant \(c_1\) was determined to be zero by applying the initial condition.

PREREQUISITES
  • Understanding of first-order linear differential equations
  • Familiarity with integrating factors in differential equations
  • Knowledge of integration techniques, particularly integration by parts
  • Basic proficiency in solving initial value problems
NEXT STEPS
  • Study the method of integrating factors in greater detail
  • Learn about solving higher-order differential equations
  • Explore the applications of differential equations in physics and engineering
  • Review techniques for solving initial value problems in various contexts
USEFUL FOR

Students and professionals in mathematics, particularly those studying differential equations, as well as educators looking for examples of initial value problem solutions.

karush
Gold Member
MHB
Messages
3,240
Reaction score
5
$\textsf{ Find the solution of the given initial value problem. State the interval in which the solution is valid.}$
$$xy^\prime+2y=\sin x, \qquad y(\pi)=\frac{1}{\pi}$$
$$\begin{array}{lrll}
\textit{rewrite as}\\
&\displaystyle y' +P(x)y
&\displaystyle=g(x) &_{(2)}\\
\textit{Divide thru by x}\\
&\displaystyle y'+\frac{2}{x}y
&\displaystyle=\frac{\sin x}{x}\\
\textit {Find u(x) }\\
&\displaystyle u(x)
&\displaystyle =\exp\int \frac{2}{x} \, dx &_{(3)}\\
&\displaystyle&=e^{\ln x^2}\\
&\displaystyle&=x^2\\
\textit{multiply thru w/ $u(x)$} \\
&\displaystyle x^2y' +2xy
&\displaystyle =x^2\sin x &_{(4)}\\
\textsf{rewrite:}\\
&(x^2 y)'&=u(x)g(x)&_{(5)}\\
\textit{Integrate }\\
&\displaystyle x^2 y
&\displaystyle=\int x^2\sin x \, dx&_{(6)}\\
&\displaystyle &=2x \sin (x)-x^2\cos(x)-2\cos(x)+c_1 &_{(5)}\\
\textit{divide thru by $x^2$}\\
&\displaystyle y
&\displaystyle=\frac{2\sin (x)}{x}
-\cos(x)-\frac{2\cos(x)}{x^2}
+\frac{c_1}{x^2} &_{(6)}\\
\textit{W|A }\\
&y&=\color{red}{\displaystyle\frac{\sin x - \cos x}{x^2}}, \qquad x>0
\end{array}$$

ok I stopped here to see if so far is ok
but the interval is kinda ? to me
 
Last edited:
Physics news on Phys.org
You wound up with $x^2\sin(x)$ on the RHS before integrating, but it should be $x\sin(x)$. :)
 
$$\begin{array}{lrll}
\textit{multiply thru w/ $x$} \\
&\displaystyle x^2y' +2xy
&\displaystyle =x\sin x\\
\textit{Integrate }\\
&\displaystyle x^2 y
&\displaystyle=\int x\sin x \, dx\\
&\displaystyle &=\sin{x}-x\cos{x}+c_1 \\
\textit{divide thru by $x^2$}\\
&\displaystyle y
&\displaystyle=\frac{\sin{x}}{x^2}-\frac{\cos{x}}{x}+\frac{c_1}{x^2}
\end{array}$$
$\textit{eMahthHelp returned }$
$$y{\left(x \right)} = \frac{1}{x} \left(\frac{C_{1}}{x} - \cos{\left(x \right)} + \frac{1}{x} \sin{\left(x \right)}\right)$$
ok now dealing with
$$\displaystyle y(\pi)=\frac{\sin{\pi}}{\pi^2}-\frac{\cos{\pi}}{\pi}+\frac{c_1}{\pi^2}=\frac{1}{\pi}$$
$$\displaystyle y(\pi)=\frac{0}{\pi^2}+\frac{1}{\pi}+\frac{c_1}{\pi^2}=\frac{1}{\pi}$$
$\textit{so}$
$\displaystyle y(\pi)
=\frac{\sin{\pi}}{\pi^2}
-\frac{\cos{\pi}}{\pi}
+\frac{c_1}{\pi^2}=\frac{1}{\pi}\\$
$\textit{then $c_1=0$ so}$
$y=\color{red}{\displaystyle\frac{\sin x - x\cos x}{x^2}}, \qquad x>0 $
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K