Transform the original equation to get less confused with constants
\left.EL\cdot\frac{d^2y}{dx^2}=P\cdot y-\frac{Wx^2}{2}\right|\times\frac{1}{EL}\longrightarrow\\[0.3cm]
y''=\overbrace\frac{P}{EL}^{n^2}\cdot y-\overbrace\frac{P}{EL}^{n^2}\cdot\frac{Wx^2}{2P}\longrightarrow\\[0.3cm]
\boxed{y''=n^2y-\frac{Wn^2x^2}{2P}}
1 STEP: Solve the homogeneous equation
y ′ ′ = n 2 y → [ y ( x ) = e k x and y ′ ′ = k 2 ⋅ e k x ] → k 2 ⋅ e k x = n 2 ⋅ e k x → [ k 1 = n k 2 = − n y''=n^2y\to[y(x)=e^{kx}\,\,\,\text{and}\,\,\,y''=k^2\cdot e^{kx}]\to\\[0.3cm]
k^2\cdot e^{kx}=n^2\cdot e^{kx}\to\left[\begin{array}{c}
k_1=n\\
k_2=-n
\end{array}\right. y ′′ = n 2 y → [ y ( x ) = e k x and y ′′ = k 2 ⋅ e k x ] → k 2 ⋅ e k x = n 2 ⋅ e k x → [ k 1 = n k 2 = − n
Then,
y h o m ( x ) = C 1 ⋅ e n x + C 2 ⋅ e − n x \boxed{y_{hom}(x)=C_1\cdot e^{nx}+C_2\cdot e^{-nx}} y h o m ( x ) = C 1 ⋅ e n x + C 2 ⋅ e − n x
2 STEP: Solve an inhomogeneous equation
To do this, find ANY particular solution, so we will look for it in the form
y p a r ( x ) = A x 2 + B x + C → y ′ ′ = 2 A y_{par}(x)=Ax^2+Bx+C\to y''=2A y p a r ( x ) = A x 2 + B x + C → y ′′ = 2 A
Substitute everything in the original equation
2 A = n 2 ⋅ ( A x 2 + B x + C ) − W n 2 x 2 2 P → ( A n 2 − W n 2 2 P ) x 2 + B n 2 x + ( C n 2 − 2 A ) = 0 → { A n 2 − W n 2 2 P = 0 → A = W 2 P B n 2 = 0 → B = 0 C n 2 − 2 A = 0 → C = W P n 2 2A=n^2\cdot\left(Ax^2+Bx+C\right)-\frac{Wn^2x^2}{2P}\to\\[0.3cm]
\left(An^2-\frac{Wn^2}{2P}\right)x^2+Bn^2x+(Cn^2-2A)=0\to\\[0.3cm]
\left\{\begin{array}{l}
An^2-\displaystyle\frac{Wn^2}{2P}=0\to\boxed{A=\frac{W}{2P}}\\[0.3cm]
Bn^2=0\to\boxed{B=0}\\[0.3cm]
Cn^2-2A=0\to\boxed{C=\frac{W}{Pn^2}}
\end{array}\right. 2 A = n 2 ⋅ ( A x 2 + B x + C ) − 2 P W n 2 x 2 → ( A n 2 − 2 P W n 2 ) x 2 + B n 2 x + ( C n 2 − 2 A ) = 0 → ⎩ ⎨ ⎧ A n 2 − 2 P W n 2 = 0 → A = 2 P W B n 2 = 0 → B = 0 C n 2 − 2 A = 0 → C = P n 2 W
Conclusion,
y p a r ( x ) = W x 2 2 P + W P n 2 y g e n ( x ) = y h o m ( x ) + y p a r ( x ) → y g e n ( x ) = C 1 ⋅ e n x + C 2 ⋅ e − n x + W x 2 2 P + W P n 2 \boxed{y_{par}(x)=\frac{Wx^2}{2P}+\frac{W}{Pn^2}}\\[0.3cm]
y_{gen}(x)=y_{hom}(x)+y_{par}(x)\to\\[0.3cm]
\boxed{y_{gen}(x)=C_1\cdot e^{nx}+C_2\cdot e^{-nx}+\frac{Wx^2}{2P}+\frac{W}{Pn^2}} y p a r ( x ) = 2 P W x 2 + P n 2 W y g e n ( x ) = y h o m ( x ) + y p a r ( x ) → y g e n ( x ) = C 1 ⋅ e n x + C 2 ⋅ e − n x + 2 P W x 2 + P n 2 W
To find the constants we will use the boundary conditions
{ y ( 0 ) = C 1 + C 2 + W P n 2 = 0 y ′ ( 0 ) = n C 1 − n C 2 = 0 → C 1 = C 2 ⟶ 2 C 1 + W P n 2 = 0 → C 1 = C 2 = − W 2 P n 2 \left\{\begin{array}{l}y(0)=C_1+C_2+\displaystyle\frac{W}{Pn^2}=0\\[0.3cm]
y'(0)=nC_1-nC_2=0\to C_1=C_2
\end{array}\right.\longrightarrow\\[0.3cm]
2C_1+\frac{W}{Pn^2}=0\to\boxed{C_1=C_2=-\frac{W}{2Pn^2}} ⎩ ⎨ ⎧ y ( 0 ) = C 1 + C 2 + P n 2 W = 0 y ′ ( 0 ) = n C 1 − n C 2 = 0 → C 1 = C 2 ⟶ 2 C 1 + P n 2 W = 0 → C 1 = C 2 = − 2 P n 2 W
Then,
y ( x ) = − W 2 P n 2 ⋅ e n x − W 2 P n 2 ⋅ e − n x + W x 2 2 P + W P n 2 → y ( x ) = W 2 P n 2 ⋅ ( 2 − ( e n x + e − n x ) ⏞ 2 cosh n x ) + W x 2 2 P → y ( x ) = W P n 2 ⋅ ( 1 − cosh n x ) + W x 2 2 P y(x)=-\frac{W}{2Pn^2}\cdot e^{nx}-\frac{W}{2Pn^2}\cdot e^{-nx}+\frac{Wx^2}{2P}+\frac{W}{Pn^2}\to\\[0.3cm]
y(x)=\frac{W}{2Pn^2}\cdot\left(2-\overbrace{\left(e^{nx}+e^{-nx}\right)}^{2\cosh nx}\right)+\frac{Wx^2}{2P}\to\\[0.3cm]
\boxed{y(x)=\frac{W}{Pn^2}\cdot(1-\cosh nx)+\frac{Wx^2}{2P}} y ( x ) = − 2 P n 2 W ⋅ e n x − 2 P n 2 W ⋅ e − n x + 2 P W x 2 + P n 2 W → y ( x ) = 2 P n 2 W ⋅ ⎝ ⎛ 2 − ( e n x + e − n x ) 2 c o s h n x ⎠ ⎞ + 2 P W x 2 → y ( x ) = P n 2 W ⋅ ( 1 − cosh n x ) + 2 P W x 2