[ home ] [ math / cs / ai / phy / as / chem / bio / geo ] [ civ / aero / mech / ee / hdl / os / dev / web / app / sys / net / sec ] [ med / fin / psy / soc / his / lit / lin / phi / arch ] [ off / vg / jp / 2hu / tc / ts / adv / hr / meta / tex ] [ chat ] [ wiki ]

Viewing source code

The following is the source code for post >>>/math/626

>>207
how did i not see this lol i have a wide collection

Consider \[y''-2y=\ln(x)\].

Let's first solve for the complementary solution, which is the general solution to the complementary equation \[y''-2y=0\].

The characteristic polynomial for the complementary equation is \[\lambda^2-2=0\], so \[\lambda=\pm \sqrt{2}\]. Hence, the complementary solution is \[y_c(x)=Ay_1(x)+By_2(x)=Ae^{-x\sqrt{2}}+Be^{x\sqrt2}\] for some constants \[A\] and \[B\]. Now let's find the particular solution using variation of parameters. Using the two basis solutions of the complementary solution, \[y_1(x)\] and \[y_2(x)\], we construct the Wronskian and get
\[W\left(e^{-x\sqrt{2}},\, e^{x\sqrt2}\right)(x) = \begin{vmatrix}
e^{-x\sqrt{2}} & e^{x\sqrt{2}}\\
\left(e^{-x\sqrt{2}}\right)' & \left(e^{x\sqrt{2}}\right)'
\end{vmatrix} = 2\sqrt2\]

Hence, for the particular solution \[y_p(x)=u_1(x)y_1(x)+u_2(x)y_2(x)\], we have, 
\begin{math}
u_1(x) = - \int\frac{\ln(x)y_2(x)\text{ d}x}{W\left(e^{-x\sqrt{2}},\, e^{x\sqrt2}\right)(x)} = -\int\frac{\ln(x)e^{x\sqrt2}\text{ d}x}{2\sqrt2} = \frac{1}{4}\operatorname{Ei}\left(x\sqrt2\right)-\frac14 e^{x\sqrt2}\ln(x)
\end{math}
\begin{math}
u_2(x) = \int\frac{\ln(x)y_1(x)\text{ d}x}{W\left(e^{-x\sqrt{2}},\, e^{x\sqrt2}\right)(x)} = \int\frac{\ln(x)e^{-x\sqrt2}\text{ d}x}{2\sqrt2} = \frac{1}{4}\operatorname{Ei}\left(-x\sqrt2\right)-\frac14 e^{-x\sqrt2}\ln(x) 
\end{math}

The particular solution then is nothing but
\begin{math}
    y_p(x) = u_1(x)y_1(x)+u_2(x)y_2(x) = \left(\frac{1}{4}\operatorname{Ei}\left(x\sqrt2\right)-\frac14 e^{x\sqrt2}\ln(x)\right) e^{-x\sqrt2} + \left(\frac{1}{4}\operatorname{Ei}\left(-x\sqrt2\right)-\frac14 e^{-x\sqrt2}\ln(x)\right) e^{x\sqrt2}\\
    = \frac14 e^{-x\sqrt2} \left( e^{2x\sqrt2}\operatorname{Ei}\left(-x\sqrt2\right) + \operatorname{Ei}\left(x\sqrt2\right) - 2e^{x\sqrt2}\ln(x) \right)
\end{math}
Thus the complete general solution is given by  
\begin{math}
\boxed{y(x) = y_c(x) + y_p(x) = Ae^{-x\sqrt{2}}+Be^{x\sqrt2} + \frac14 e^{-x\sqrt2} \left( e^{2x\sqrt2}\operatorname{Ei}\left(-x\sqrt2\right) + \operatorname{Ei}\left(x\sqrt2\right) - 2e^{x\sqrt2}\ln(x) \right)}
\end{math}