Note : Probably, you made a mistake in writing the assignment. I will correct the task so that it can be solved.
Solve ordinary differential equation :
d 2 y d x 2 − 2 x ⋅ d y d x + ( x 2 + 2 ) y = e ( x 2 + 2 ) \frac{d^2y}{dx^2}-2x\cdot\frac{dy}{dx} + (x^2+2)y= \sqrt{e}(x^2+2) d x 2 d 2 y − 2 x ⋅ d x d y + ( x 2 + 2 ) y = e ( x 2 + 2 )
From the theory we know that for solving the equation
y ′ ′ + f ( x ) ⋅ y ′ + g ( x ) ⋅ y = F ( x ) y''+f(x)\cdot y'+g(x)\cdot y=F(x) y ′′ + f ( x ) ⋅ y ′ + g ( x ) ⋅ y = F ( x )
convenient to introduce a new variable
y ( x ) = k ( x ) ⋅ e x p ( − 1 2 ⋅ ∫ f ( x ) d x ) y(x)=k(x)\cdot exp\left(-\frac{1}{2}\cdot\int f(x)dx\right) y ( x ) = k ( x ) ⋅ e x p ( − 2 1 ⋅ ∫ f ( x ) d x )
In our case,
d 2 y d x 2 − 2 x ⏟ f ( x ) ⋅ d y d x + ( x 2 + 2 ) ⏟ g ( x ) y = e ( x 2 + 2 ) ⏟ F ( x ) \frac{d^2y}{dx^2}\underbrace{-2x}_{f(x)}\cdot\frac{dy}{dx} +\underbrace{(x^2+2)}_{g(x)}y= \underbrace{\sqrt{e}(x^2+2)}_{F(x)} d x 2 d 2 y f ( x ) − 2 x ⋅ d x d y + g ( x ) ( x 2 + 2 ) y = F ( x ) e ( x 2 + 2 )
Then,
f ( x ) = − 2 x → − 1 2 ⋅ ∫ f ( x ) d x = − 1 2 ⋅ ∫ ( − 2 x ) d x = x 2 2 y ( x ) = k ( x ) ⋅ e x 2 / 2 → d y d x = k ′ ⋅ e x 2 / 2 + x k ⋅ e x 2 / 2 d y d x = e x 2 / 2 ⋅ ( k ′ + x k ) d 2 y d x 2 = k ′ ′ ⋅ e x 2 / 2 + x k ′ ⋅ e x 2 / 2 + k ⋅ e x 2 / 2 + x k ′ ⋅ e x 2 / 2 + x 2 k ⋅ e x 2 / 2 d 2 y d x 2 = e x 2 / 2 ⋅ ( k ′ ′ + 2 x k ′ + k + x 2 k ) f(x)=-2x\to-\frac{1}{2}\cdot\int f(x)dx=-\frac{1}{2}\cdot\int (-2x)dx=\frac{x^2}{2}\\[0.3cm]
y(x)=k(x)\cdot e^{x^2/2}\to \frac{dy}{dx}=k'\cdot e^{x^2/2}+xk\cdot e^{x^2/2}\\[0.3cm]
\boxed{\frac{dy}{dx}=e^{x^2/2}\cdot\left(k'+xk\right)}\\[0.3cm]
\frac{d^2y}{dx^2}=k''\cdot e^{x^2/2}+xk'\cdot e^{x^2/2}+k\cdot e^{x^2/2}+xk'\cdot e^{x^2/2}+x^2k\cdot e^{x^2/2}\\[0.3cm]
\boxed{\frac{d^2y}{dx^2}=e^{x^2/2}\cdot\left(k'' +2xk'+k+x^2k\right)} f ( x ) = − 2 x → − 2 1 ⋅ ∫ f ( x ) d x = − 2 1 ⋅ ∫ ( − 2 x ) d x = 2 x 2 y ( x ) = k ( x ) ⋅ e x 2 /2 → d x d y = k ′ ⋅ e x 2 /2 + x k ⋅ e x 2 /2 d x d y = e x 2 /2 ⋅ ( k ′ + x k ) d x 2 d 2 y = k ′′ ⋅ e x 2 /2 + x k ′ ⋅ e x 2 /2 + k ⋅ e x 2 /2 + x k ′ ⋅ e x 2 /2 + x 2 k ⋅ e x 2 /2 d x 2 d 2 y = e x 2 /2 ⋅ ( k ′′ + 2 x k ′ + k + x 2 k )
We substitute the found derivatives into the initial equation
d 2 y d x 2 − 2 x ⋅ d y d x + ( x 2 + 2 ) ⋅ y = e ⋅ ( x 2 + 2 ) e x 2 / 2 ⋅ ( k ′ ′ + 2 x k ′ + k + x 2 k ) − 2 x ⋅ e x 2 / 2 ⋅ ( k ′ + x k ) + + ( x 2 + 2 ) ⋅ e x 2 / 2 ⋅ k = e ⋅ ( x 2 + 2 ) ∣ ÷ ( e − x 2 / 2 ) k ′ ′ + 2 x k ′ + k + x 2 k − 2 x k ′ − 2 x 2 k + x 2 k + 2 k = e − x 2 / 2 ⋅ e ⋅ ( x 2 + 2 ) k ′ ′ + 3 k = e − x 2 / 2 ⋅ e ⋅ ( x 2 + 2 ) \frac{d^2y}{dx^2}-2x\cdot\frac{dy}{dx}+(x^2+2)\cdot y=\sqrt{e}\cdot(x^2+2)\\[0.3cm]
e^{x^2/2}\cdot\left(k'' +2xk'+k+x^2k\right)-2x\cdot e^{x^2/2}\cdot\left(k'+xk\right)+\\[0.3cm]
\left.+(x^2+2)\cdot e^{x^2/2}\cdot k=\sqrt{e}\cdot(x^2+2)\right|\div\left(e^{-x^2/2}\right)\\[0.3cm]
k'' +2xk'+k+x^2k-2xk'-2x^2k+x^2k+2k=e^{-x^2/2}\cdot\sqrt{e}\cdot(x^2+2)\\[0.3cm]
k''+3k=e^{-x^2/2}\cdot\sqrt{e}\cdot(x^2+2) d x 2 d 2 y − 2 x ⋅ d x d y + ( x 2 + 2 ) ⋅ y = e ⋅ ( x 2 + 2 ) e x 2 /2 ⋅ ( k ′′ + 2 x k ′ + k + x 2 k ) − 2 x ⋅ e x 2 /2 ⋅ ( k ′ + x k ) + + ( x 2 + 2 ) ⋅ e x 2 /2 ⋅ k = e ⋅ ( x 2 + 2 ) ∣ ∣ ÷ ( e − x 2 /2 ) k ′′ + 2 x k ′ + k + x 2 k − 2 x k ′ − 2 x 2 k + x 2 k + 2 k = e − x 2 /2 ⋅ e ⋅ ( x 2 + 2 ) k ′′ + 3 k = e − x 2 /2 ⋅ e ⋅ ( x 2 + 2 )
This is a second order inhomogeneous equation. The solutions will have the form :
k ( x ) = k h o m ( x ) + k p a r t ( x ) , where k h o m ( x ) : k ′ ′ + 3 k = 0 → k ( x ) = e λ x → k ′ ( x ) = λ ⋅ e λ x and k ′ ′ ( x ) = λ 2 ⋅ e λ x e λ x ⋅ ( λ 2 + 3 ) = 0 → [ λ 1 = i 3 λ 2 = − i 3 ⟶ k h o m ( x ) = A 1 ⋅ e i 3 x + A 2 ⋅ e − i 3 x ≡ C 1 cos ( 3 x ) + C 2 sin ( 3 x ) k h o m ( x ) = C 1 cos ( 3 x ) + C 2 sin ( 3 x ) k(x)=k_{hom}(x)+k_{part}(x),\,\,\,\text{where}\\[0.3cm]
k_{hom}(x) : k''+3k=0\to k(x)=e^{\lambda x}\to\\[0.3cm]
k'(x)=\lambda\cdot e^{\lambda x}\,\,\,\text{and}\,\,\, k''(x)=\lambda^2\cdot e^{\lambda x}\\[0.3cm]
e^{\lambda x}\cdot(\lambda^2+3)=0\to
\left[\begin{array}{l}
\lambda_1=i\sqrt{3}\\[0.3cm]
\lambda_2=-i\sqrt{3}
\end{array}\right.\longrightarrow\\[0.3cm]
k_{hom}(x)=A_1\cdot e^{i\sqrt{3}x}+A_2\cdot e^{-i\sqrt{3}x}\equiv C_1\cos\left(\sqrt{3}x\right)+C_2\sin\left(\sqrt{3}x\right)\\[0.3cm]
\boxed{k_{hom}(x)= C_1\cos\left(\sqrt{3}x\right)+C_2\sin\left(\sqrt{3}x\right)} k ( x ) = k h o m ( x ) + k p a r t ( x ) , where k h o m ( x ) : k ′′ + 3 k = 0 → k ( x ) = e λ x → k ′ ( x ) = λ ⋅ e λ x and k ′′ ( x ) = λ 2 ⋅ e λ x e λ x ⋅ ( λ 2 + 3 ) = 0 → ⎣ ⎡ λ 1 = i 3 λ 2 = − i 3 ⟶ k h o m ( x ) = A 1 ⋅ e i 3 x + A 2 ⋅ e − i 3 x ≡ C 1 cos ( 3 x ) + C 2 sin ( 3 x ) k h o m ( x ) = C 1 cos ( 3 x ) + C 2 sin ( 3 x )
We look for a particular solution in the form
k p a r t ( x ) = e − x 2 / 2 ⋅ ( A x 2 + B x + C ) k ′ ′ = ( e − x 2 / 2 ) ′ ′ ⋅ ( A x 2 + B x + C ) + 2 ( e − x 2 / 2 ) ′ ( A x 2 + B x + C ) ′ + e − x 2 / 2 ( A x 2 + B x + C ) ′ ′ = e − x 2 / 2 ( x 2 − 1 ) ( A x 2 + B x + C ) + + e − x 2 / 2 ( − 2 x ) ( 2 A x + B ) + e − x 2 / 2 ( 2 A ) k ′ ′ + 3 k = e − x 2 / 2 ( ( x 2 − 1 ) ( A x 2 + B x + C ) − 4 A x 2 − 2 B x + 2 A ) → e − x 2 / 2 ( ( x 2 − 1 ) ( A x 2 + B x + C ) − 4 A x 2 − 2 B x + 2 A ) + + 3 ⋅ e − x 2 / 2 ( A x 2 + B x + C ) = e ( 1 − x 2 ) / 2 ( x 2 + 2 ) ∣ ÷ ( e − x 2 / 2 ) A x 4 + B x 3 + C x 2 − A x 2 − B x − C − 4 A x 2 − 2 B x + 2 A + + 3 A x 2 + 3 B x + 3 C = e ( x 2 + 2 ) A x 4 + B x 3 + ( C − 2 A − e ) x 2 + ( 2 A + 2 C − 2 e ) = 0 { x 4 : A = 0 x 3 : B = 0 x 2 : C − 2 A − e = 0 → C = e x 0 : 2 A + 2 C − 2 e = 0 k_{part}(x)=e^{-x^2/2}\cdot\left(Ax^2+Bx+C\right)\\[0.3cm]
k''=\left(e^{-x^2/2}\right)''\cdot\left(Ax^2+Bx+C\right)+2\left(e^{-x^2/2}\right)'\left(Ax^2+Bx+C\right)'\\[0.3cm]
+e^{-x^2/2}\left(Ax^2+Bx+C\right)''
=e^{-x^2/2}(x^2-1)\left(Ax^2+Bx+C\right)+\\[0.3cm]+e^{-x^2/2}(-2x)\left(2Ax+B\right)
+e^{-x^2/2}(2A)\\[0.3cm]
k''+3k=e^{-x^2/2}((x^2-1)\left(Ax^2+Bx+C\right)-4Ax^2-2Bx+2A)\to\\[0.3cm]
e^{-x^2/2}((x^2-1)\left(Ax^2+Bx+C\right)-4Ax^2-2Bx+2A)+\\[0.3cm]
\left.+3\cdot e^{-x^2/2}(Ax^2+Bx+C)=e^{(1-x^2)/2}(x^2+2)\right|\div\left(e^{-x^2/2}\right)\\[0.3cm]
Ax^4+Bx^3+Cx^2-Ax^2-Bx-C-4Ax^2-2Bx+2A+\\[0.3cm]
+3Ax^2+3Bx+3C=\sqrt{e}(x^2+2)\\[0.3cm]
Ax^4+Bx^3+(C-2A-\sqrt{e})x^2+(2A+2C-2\sqrt{e})=0\\[0.3cm]
\left\{\begin{array}{l}
x^4 : A=0\\[0.3cm]
x^3 : B=0\\[0.3cm]
x^2 : C-2A-\sqrt{e}=0\to C=\sqrt{e}\\[0.3cm]
x^0 : 2A+2C-2\sqrt{e}=0
\end{array}\right. k p a r t ( x ) = e − x 2 /2 ⋅ ( A x 2 + B x + C ) k ′′ = ( e − x 2 /2 ) ′′ ⋅ ( A x 2 + B x + C ) + 2 ( e − x 2 /2 ) ′ ( A x 2 + B x + C ) ′ + e − x 2 /2 ( A x 2 + B x + C ) ′′ = e − x 2 /2 ( x 2 − 1 ) ( A x 2 + B x + C ) + + e − x 2 /2 ( − 2 x ) ( 2 A x + B ) + e − x 2 /2 ( 2 A ) k ′′ + 3 k = e − x 2 /2 (( x 2 − 1 ) ( A x 2 + B x + C ) − 4 A x 2 − 2 B x + 2 A ) → e − x 2 /2 (( x 2 − 1 ) ( A x 2 + B x + C ) − 4 A x 2 − 2 B x + 2 A ) + + 3 ⋅ e − x 2 /2 ( A x 2 + B x + C ) = e ( 1 − x 2 ) /2 ( x 2 + 2 ) ∣ ∣ ÷ ( e − x 2 /2 ) A x 4 + B x 3 + C x 2 − A x 2 − B x − C − 4 A x 2 − 2 B x + 2 A + + 3 A x 2 + 3 B x + 3 C = e ( x 2 + 2 ) A x 4 + B x 3 + ( C − 2 A − e ) x 2 + ( 2 A + 2 C − 2 e ) = 0 ⎩ ⎨ ⎧ x 4 : A = 0 x 3 : B = 0 x 2 : C − 2 A − e = 0 → C = e x 0 : 2 A + 2 C − 2 e = 0
Conclusion,
k p a r t ( x ) = e − x 2 / 2 ⋅ e \boxed{k_{part}(x)=e^{-x^2/2}\cdot\sqrt{e}} k p a r t ( x ) = e − x 2 /2 ⋅ e
Then,
k ( x ) = k h o m ( x ) + k p a r t ( x ) → k ( x ) = C 1 cos ( 3 x ) + C 2 sin ( 3 x ) + e − x 2 / 2 ⋅ e k(x)=k_{hom}(x)+k_{part}(x)\to\\[0.3cm]
\boxed{k(x)=C_1\cos\left(\sqrt{3}x\right)+C_2\sin\left(\sqrt{3}x\right)+e^{-x^2/2}\cdot\sqrt{e}} k ( x ) = k h o m ( x ) + k p a r t ( x ) → k ( x ) = C 1 cos ( 3 x ) + C 2 sin ( 3 x ) + e − x 2 /2 ⋅ e
Finally, general solution is
y ( x ) = e x 2 / 2 ⋅ k ( x ) = = ( C 1 cos ( 3 x ) + C 2 sin ( 3 x ) + e − x 2 / 2 ⋅ e ) ⋅ e x 2 / 2 → y ( x ) = ( C 1 cos ( 3 x ) + C 2 sin ( 3 x ) ) ⋅ e x 2 / 2 + e y(x)=e^{x^2/2}\cdot k(x)=\\[0.3cm]
=\left(C_1\cos\left(\sqrt{3}x\right)+C_2\sin\left(\sqrt{3}x\right)+e^{-x^2/2}\cdot\sqrt{e}\right)\cdot e^{x^2/2}\to\\[0.3cm]
\boxed{y(x)=\left(C_1\cos\left(\sqrt{3}x\right)+C_2\sin\left(\sqrt{3}x\right)\right)\cdot e^{x^2/2}+\sqrt{e}} y ( x ) = e x 2 /2 ⋅ k ( x ) = = ( C 1 cos ( 3 x ) + C 2 sin ( 3 x ) + e − x 2 /2 ⋅ e ) ⋅ e x 2 /2 → y ( x ) = ( C 1 cos ( 3 x ) + C 2 sin ( 3 x ) ) ⋅ e x 2 /2 + e
ANSWER
y ( x ) = ( C 1 cos ( 3 x ) + C 2 sin ( 3 x ) ) ⋅ e x 2 / 2 + e y(x)=\left(C_1\cos\left(\sqrt{3}x\right)+C_2\sin\left(\sqrt{3}x\right)\right)\cdot e^{x^2/2}+\sqrt{e} y ( x ) = ( C 1 cos ( 3 x ) + C 2 sin ( 3 x ) ) ⋅ e x 2 /2 + e
Comments