Solve differential equation with a least square method

209 Views Asked by At

I'm trying to solve the following differential equation: $$\frac{d^2u}{dx^2}=\frac{du}{dx}*u+u^2+x$$ $$x \in \Omega=[0,1]$$ $$BCS:u|_{x=0}=1;\frac{du}{dx}|_{x=0}=1$$ Least square method is one of methods based on minimizing the functional $$I(u)=\int_{\Omega}(A[u]-f)^2d\Omega+\int_{\Gamma}(B[u]-g)^2d\Gamma $$ where $\Gamma$ - is the boundary of domain,$A$-differential operator in the domain, $B$ -differential operator in the boundary, f - right hand side of equation, g - right hand side of BCS.

The solution to this problem is well known and based on solving the equation: $$\int_{\Omega}A[\delta u](A[u]-f)d\Omega+\int_{\Gamma}B[\delta u](B[u]-g)d\Gamma=0 $$ where we paste an approximation of function $u$ and variation $\delta u$ as $$ u=\phi_0+\alpha_1x+\alpha_2x^2$$ $$ \delta u=\delta\alpha_1x + \delta\alpha_2x^2$$ and since parameters $\delta\alpha$ are arbitrary it transforms in system of equations

My question is that in the differential equation is non linear and the resulting system is nonlinear. So example $$\int_{\Omega}A[\delta\alpha_1x + \delta\alpha_2x^2](A[\phi_0+\alpha_1x+\alpha_2x^2]-f)d\Omega+\int_{\Gamma}B[\delta\alpha_1x + \delta\alpha_2x^2](B[\phi_0+\alpha_1x+\alpha_2x^2]-g)d\Gamma=0 $$ When we expand the brackets in $f$ we get $$u^2=(\phi_0+\alpha_1x+\alpha_2x^2)^2$$ and we get terms from f like $$2\alpha_1 \alpha_2x^3$$ Can we simplify this differential equation to get rid of $u^2$. This will lead to linear system in least square method