It depends on my previous question. Closed form solution of DE
I don't want to deal with Airy functions. How can I approximate this DE in continous domain $[0,1]$?
$$y''(x)+(x+1)y(x)=0\quad\text{ with the initial conditions}\quad y(0)=0\quad y'(0)=1$$
What if the conditions change to
$$y''(x)+(x+1)y(x)=0\quad\text{ with the initial conditions}\quad y(0)=0\quad y'(1)=1$$
May I use the same methods?
If you want to approximate on $L^2$ you can choose a polynomial $$\hat y=a\,x^3+b\,x^2+c\,x+d$$ To satisfy the initial conditions $$y(0)=0\Rightarrow d=0$$ $$y'(0)=1\Rightarrow c=1$$ Now you can construct the residual integral for your domain $$R=\int_0^1\big(\hat y''(x)+(x+1)\hat y(x)\big)^2dx=\int_0^1\big(6\,a\,x+b+(x+1)(a\,x^3+b\,x^2+x)\big)^2dx$$ $$=\frac{31}{30}+\frac{877 a}{105}+\frac{21299 a^2}{1260}+\frac{149 b}{30}+\frac{8549 a b}{420}+\frac{736 b^2}{105}$$ Now you can minimize the residual wrt $a$ and $b$ $$\frac {\partial R}{\partial a}=\frac{877}{105}+\frac{21299 a}{630}+\frac{8549 b}{420}=0$$ $$\frac {\partial R}{\partial b}=\frac{149}{30}+\frac{8549 a}{420}+\frac{1472 b}{105}=0$$ The solution of the system $a=-0.268$ and $b=0.035$; and the residual is $0.0004$ over the domain.
--------------EDIT-------------
To satisfy the initial conditions $$y(0)=0\Rightarrow d=0$$ $$y'(1)=1\Rightarrow c=1-3a-2b$$ $$R=\int_0^1\big(\hat y''(x)+(x+1)\hat y(x)\big)^2dx=\int_0^1\big(6\,a\,x+b+(x+1)(a\,x^3+b\,x^2+(1-3a-2b)x)\big)^2dx$$ $$=\frac{31}{30}+\frac{226 a}{105}+\frac{289 a^2}{252}+\frac{5 b}{6}+\frac{23 a b}{20}+\frac{127 b^2}{105}$$ By setting the partial derivatives again to zero we can solve the equation for $a=-1.005$ and $b=0.133$. It follows that $c=1-3a-2b=3.749$.