Author Topic: Problem 2 (main)  (Read 13908 times)

Victor Ivrii

  • Administrator
  • Elder Member
  • *****
  • Posts: 2607
  • Karma: 0
    • View Profile
    • Personal website of Victor Ivrii
Problem 2 (main)
« on: October 23, 2019, 05:59:13 AM »
(a) Find Wronskian  $W(y_1,y_2)(x)$ of a fundamental set of solutions $y_1(x) , y_2(x)$ for ODE 
\begin{equation*}
x^2 y'' -2xy' + (x^2+2)y=0
\end{equation*}
(b) Check that $y_1(x)=x\cos(x)$ is a solution and find another linearly independent solution.

(c) Write the general solution, and find solution such that ${y(\frac{\pi}{2})=1, y'(\frac{\pi}{2})=0}$.

Yuying Chen

  • Jr. Member
  • **
  • Posts: 14
  • Karma: 8
    • View Profile
Re: Problem 2 (main)
« Reply #1 on: October 23, 2019, 07:10:28 AM »
$\text{(a)}\\$
$y^{\prime\prime}-\frac{2}{x}y^{\prime}+\frac{x^2+2}{x^2}y=0\\$
$W=ce^{-\int {p(x)dx}}=ce^{2\int {\frac{1}{x}dx}}=cx^2\\$
$\text{Let $c=1, W=x^2$ }\\ \\$

$\text{(b)}\\$
$\text{Verify that $y_1(x) = x\cos x$ is the solution}\\$
$y_1(x) = x\cos x\\$
$y_1^{\prime}(x) = \cos x-x\sin x\\$
$y_1^{\prime\prime}(x)= -\sin x-\sin x -x\cos x = -2\sin x-x\cos x\\$
$\text{Substitute these into the given equation: $x^2y^{\prime\prime}-2xy^{\prime}+(x^2+2)y=0$}\\$
$\quad x^{2}(-2\sin x-x\cos x)-2x(\cos x-x\sin x)+(x^{2}+2)(x\cos x)=0\\$
$-2x^{2}\sin x-x^{3}\cos x-2x\cos x+2x^{x}\sin x+x^{3}\cos x+2x\cos x=0\\$
$\text{Therefore, $y_1(x)=x\cos x$ is the solution.}\\ \\$
$W=\begin{vmatrix}
x\cos x & y_2 \\
\cos x-x\sin x & y_2^{\prime} \\
\end{vmatrix}=x^2\\$

$(x\cos x)y_2^{\prime}-(\cos x-x\sin x)y_2=x^2\\$
$y_2^{\prime}- \frac{\cos x-x\sin x}{x\cos x}y_2=\frac{x}{\cos x}\\$
$\mu = e^{\int {p(x)dx}}=e^{-\int {\frac{\cos x-x\sin x}{x\cos x}dx}} \qquad\text{By substitution, $u=x\cos x, du=(\cos x-x\sin x)dx$}\\$
$\qquad\qquad\quad =e^{-\int \frac{1}{u}}du\\$
$\qquad\qquad\quad=e^{-lnu}\\$
$\qquad\qquad\quad=\frac{1}{u}\\$
$\qquad\qquad\quad=\frac{1}{x\cos x}\\ \\$

$\frac{1}{x\cos x}y_2^{\prime}-{\frac{\cos x-x\sin x}{x^{2}\cos^{2} x} y_2}=\frac{1}{\cos^{2} x}\\$
$\frac{1}{x\cos x}y_2=\int \frac{1}{\cos^{2} x}dx\\$
$\qquad\quad=\int \sec^{2} xdx\\$
$\qquad\quad=\tan x+c\\$
$y_2=x\cos x·\tan{x}+x\cos x·c\\$
$\quad=x\cos x·\frac{\sin x}{\cos x}+x\cos x·c\\$
$\text{Let $c=0, y_2=x\sin x$}\\$
$\text{Therefore,}\\$
$y=c_1x\cos x+c_2x\sin x\\$

$\text{(c)}\\$
$y^{\prime}=c_1\cos x-c_1x\sin x+c_2\sin x+c_2x\cos x\\$
$y(\frac{\pi}{2})=1\Rightarrow c_1·(\frac{\pi}{2})·\cos (\frac{\pi}{2})+c_2·(\frac{\pi}{2})·\sin (\frac{\pi}{2})=1 \\$
$\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad c_2=\frac{2}{\pi}\\$
$y^{\prime}(\frac{\pi}{2})=0\Rightarrow -c_1·\frac{\pi}{2}·1+c_2·1=0\\$
$\quad\qquad\qquad\qquad\qquad\qquad c_1=\frac{4}{\pi^2}\\$
$\text{Thus,}\\$
$y=\frac{4}{\pi^2}x\cos x+\frac{2}{\pi}x\sin x$

No reason to post after this. V.I.
« Last Edit: October 31, 2019, 10:01:03 AM by Victor Ivrii »

Jingwen Deng

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Problem 2 (main)
« Reply #2 on: October 23, 2019, 07:46:30 AM »
a)
x²y''−2xy'+(x²+2)y=0
y''-2/xy'+(1+2/x²)y=0
W=ce^(∫(2/x)dx)=cx²
Let c=1, then W=x²

b)
y1(x)=x\cos(x)
y1'=\cosx-x\sinx
y1''=-\sinx-\sinx-x\cosx
x²(-\sinx-\sinx-x\cosx)-2x(\cosx-x\sinx)+(x²+2)(x\cos(x)=0
Therefore, y1(x)=x\cos(x) is a solution of this equation.
W=|y1  y2| = |x\cos(x)                  y2| = x²
     |y1' y2'|    |\cosx-x\sinx  y2'|
Thus, x\cos(x)y2'-(\cosx-x\sinx)y2 = x²
y2'-(\cosx-x\sinx)/(x\cosx)y2 = x²/(x\cosx)
y2'-(1/x-\tanx)y2 = x²/(x\cosx)
μ= e^∫[\tanx-(1/x)]dx = e^(ln(\secx))*e^(ln(1/x)) = (\secx)/x = 1/(x\cosx)
Multiply both sides by μ
y2'/(x\cosx)-[(\cosx-x\sinx)/(x\cosx)²]y2 = [x/(\cosx)]/(x*\cosx)= 1/cos²x
[y2*1/(x\cosx)]' = 1/cos²x
y2*1/(x\cosx) = ∫[1/(\cos²x)]dx = \tanx + C
y2 = \tanx*x*\cosx = x*\sinx

c)
General solution: Y = c1y1+c2y2 = c1x*\cosx + c2x*\sinx
Y(π/2)=c2*π/2=1
c2=2/π
Y'(π/2)=-c1π/2+c2=0
c1=4/π
Thus, Y = 4/π(x*\cosx) + 2/π(x*\sinx)



Xinqiao Li

  • Full Member
  • ***
  • Posts: 15
  • Karma: 1
    • View Profile
Re: Problem 2 (main)
« Reply #3 on: October 23, 2019, 08:12:27 AM »
Could also use Reduction of Order to solve part b).

Take $c = 1, W(y_1, y_2)(x) = x^2$.

By Reduction of Order, we have:
$$y_2 = y_1\int(\frac{ce^{-\int p(x)dx}}{(y_1)^2})dx = xcosx\int(\frac{x^2}{(x^2cos^2x})dx = xcosx\int sec^2xdx = xcosx tanx = xsinx$$

Xinqiao Li

  • Full Member
  • ***
  • Posts: 15
  • Karma: 1
    • View Profile
Re: Problem 2 (main)
« Reply #4 on: October 23, 2019, 08:23:07 AM »
b) Forgot to check $y_1(x) = xcosx$ is a valid solution.

Since $y_1(x) = xcosx$, $y'_1(x) = cosx-xsinx$, $y''_1(x) = -sinx-xcosx-sinx = -xcosx-2sinx$

Plug in: $x^2y'' -2xy' + (x^2+2)y = 0 = -x^3cosx-2x^2sinx - 2xcosx + 2x^2sinx + x^3cosx + 2xcosx = 0$

So $y_1(x) = xcosx$ is a solution.
« Last Edit: October 23, 2019, 08:25:08 AM by XinqiaoLi »

ZYR

  • Jr. Member
  • **
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Problem 2 (main)
« Reply #5 on: October 23, 2019, 12:40:24 PM »
For question (b), I  think the first student who reply it forget to verify that $y_1(x) = xcos(x)$ is a solution.
Here is my solution: $y_1(x) = xcos(x)$
                              $y_1'(x) = cos(x) - xsin(x)$
                              $y_1''(x) = -sin(x) - sin(x) - xcos(x)$
Then substitute this to the original equation, we have
                              $(x^2y'' -2xy' + (x^2 + 2)y = 0$
$x^2( -sin(x) - sin(x) - xcos(x)) -2x(cos(x) - xsin(x)) +(x^2 +2) xcos(x)
= -2x^2sin(x) - x^3cos(x) -2xcos(x) +2x^2sin(x) + x^3cos(x) + 2xcos(x) = 0$

So,  $y_1(x) = xcos(x)$ is a solution.

Also, there is a mistake when the first student do the integral part for the question b), it should be $\int sec^2 x dx = tanx + c$

We are looking for another solution, not for all other solutions. No mistake. V.I.
« Last Edit: October 31, 2019, 10:02:58 AM by Victor Ivrii »

Zhangxinbei

  • Jr. Member
  • **
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Problem 2 (main)
« Reply #6 on: October 23, 2019, 01:44:09 PM »
For b)
I choose c = 1
= xcosx(tan x + 1)
= xcosxtanx + xcosx
= x cosx(six/cosx) + xcosx
= xsinx + xcosx

BJM

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Problem 2 (main)
« Reply #7 on: October 23, 2019, 02:13:52 PM »
Here is the solution.

Xinqiao Li

  • Full Member
  • ***
  • Posts: 15
  • Karma: 1
    • View Profile
Re: Problem 2 (main)
« Reply #8 on: October 23, 2019, 04:09:34 PM »
a) Find Wronskian $W(y_1, y_2)(x)$ of a fundamental set of solutions $y_1(x)$, $y_2(x)$ for ODE $x^2y'' -2xy' + (x^2+2)y = 0$
b) Check that $y_1(x) = xcosx$ is a solution and find another linearly independent solution.
c) Write the general solution, and find solution that $y(\frac{\pi}{2}) = 1, y'(\frac{\pi}{2}) = 0$

a)
$$y'' - \frac{2}{x}y' + (1 + \frac{2}{x^2}) = 0$$
We see that $p(x) = -\frac{2}{x}$ is continuous everywhere except at $x=0$, $q(x) = (1 + \frac{2}{x^2})$ is continuous everywhere except at $x=0$.

Then by Abel's Theorem,
$$W(y_1, y_2)(x) = ce^{-\int p(x)dx} = ce^{\int(\frac{2}{x})dx} = ce^{2lnx} = cx^2$$
b)
Let's verify $y_1(x) = xcosx$ is a valid solution.

Since $y_1(x) = xcosx$, $y'_1(x) = cosx-xsinx$, $y''_1(x) = -sinx-xcosx-sinx = -xcosx-2sinx$

Plug in: $x^2y'' -2xy' + (x^2+2)y = 0 = -x^3cosx-2x^2sinx - 2xcosx + 2x^2sinx + x^3cosx + 2xcosx = 0$

So $y_1(x) = xcosx$ is a solution.

Take $c = 1, W(y_1, y_2)(x) = x^2$.

By Reduction of Order, we have:
$$y_2 = y_1\int(\frac{ce^{-\int p(x)dx}}{(y_1)^2})dx = xcosx\int(\frac{x^2}{(x^2cos^2x})dx = xcosx\int sec^2xdx = xcosx tanx = xsinx$$

c)
Then by part b, the general solution is $y = c_1xcosx +c_2xsinx$

The derivative is given by $y' = c_1(cosx -xsinx) + c_2(xcosx + sinx)$

Plug in the initial conditions $y(\frac{\pi}{2}) = 1, y'(\frac{\pi}{2}) = 0$, we have

$1 = \frac{\pi}{2}c_2$ and $0 = (-\frac{\pi}{2})c_1 + c_2$

So $c_2 = \frac{2}{\pi}$ and $c_1 = \frac{4}{(\pi)^2}$

The particular solution is,
$$y = \frac{4}{(\pi)^2}xcosx +\frac{2}{\pi}xsinx$$

yueyangyu

  • Jr. Member
  • **
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Problem 2 (main)
« Reply #9 on: October 23, 2019, 04:49:43 PM »
a)
$$y'' - \frac{2}{x}y' + (1 + \frac{2}{x^2}) = 0$$

$$W(y_1, y_2)(x) = ce^{-\int p(x)dx} = ce^{\int(\frac{2}{x})dx} = ce^{2lnx} = cx^2$$

b)

Since $y_1(x) = xcosx$, $y'_1(x) = cosx-xsinx$, $y''_1(x) = -sinx-xcosx-sinx = -xcosx-2sinx$

 $x^2y'' -2xy' + (x^2+2)y = 0 = -x^3cosx-2x^2sinx - 2xcosx + 2x^2sinx + x^3cosx + 2xcosx = 0$

So $y_1(x) = xcosx$ is a solution.

Let $c = 1, W(y_1, y_2)(x) = x^2$.

$$y_2 = y_1\int(\frac{ce^{-\int p(x)dx}}{(y_1)^2})dx = xcosx\int(\frac{x^2}{(x^2cos^2x})dx = xcosx\int sec^2xdx = xcosx tanx = xsinx$$

c)
The general solution is $y = c_1xcosx +c_2xsinx$

 $y' = c_1(cosx -xsinx) + c_2(xcosx + sinx)$

 $y(\frac{\pi}{2}) = 1, y'(\frac{\pi}{2}) = 0$, we have

$1 = \frac{\pi}{2}c_2$ and $0 = (-\frac{\pi}{2})c_1 + c_2$

So $c_2 = \frac{2}{\pi}$ and $c_1 = \frac{4}{(\pi)^2}$

$$y = \frac{4}{(\pi)^2}xcosx +\frac{2}{\pi}xsinx$$
« Last Edit: October 23, 2019, 04:54:19 PM by yueyangyu »