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

  • MHB
  • Thread starter karush
  • Start date
In summary, the given initial value problem is $xy^\prime+2y=\sin x$, with the solution $y=\frac{\sin x - x\cos x}{x^2}$, valid for $x>0$. The interval in which the solution is valid is $x>0$.
  • #1
karush
Gold Member
MHB
3,269
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
  • #2
You wound up with $x^2\sin(x)$ on the RHS before integrating, but it should be $x\sin(x)$. :)
 
  • #3
$$\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:

1. What is the meaning of "2.2.8 de xy'+2y=sin x,y(pi)=1/pi find solution"?

The given equation is a second-order linear differential equation with variable coefficients, where x and y are independent variables and y' represents the first derivative of y with respect to x. The equation is accompanied by an initial condition, where y is equal to 1/pi when x is equal to pi.

2. How do I solve a second-order linear differential equation with variable coefficients?

To solve this type of equation, you can use the method of undetermined coefficients or the method of variation of parameters. In this case, the method of variation of parameters would be more suitable as it can be used to find a particular solution for non-homogeneous equations like the one given.

3. What is the general form of the solution for a second-order linear differential equation with variable coefficients?

The general form of the solution is y(x) = c1y1(x) + c2y2(x) + yp(x), where c1 and c2 are arbitrary constants and y1(x) and y2(x) are linearly independent solutions of the corresponding homogeneous equation. yp(x) is the particular solution found using the method of variation of parameters.

4. How do I apply the initial condition to find the particular solution in this equation?

To apply the initial condition, you can first find the general solution as mentioned in the previous answer. Then, substitute the value of x and y given in the initial condition into the general solution. This will give you a system of equations that can be solved to find the values of the arbitrary constants c1 and c2. Finally, substitute these values back into the general solution to obtain the particular solution.

5. Can I verify if my solution is correct?

Yes, you can verify your solution by substituting it into the original equation and checking if it satisfies the equation. You can also plot the graph of the solution to visually see if it is correct.

Similar threads

  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
4
Views
1K
  • Differential Equations
Replies
4
Views
1K
  • Differential Equations
Replies
1
Views
862
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
6
Views
2K
Back
Top