Approximation of DE 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?
 A: 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$.
A: The simplest "brute-force" approach would be to attempt a power series solution. The basic idea is to guess that the solution is of the form $y(x) = \sum_{n=0}^{\infty}a_{n}x^n$ and our task is to find the $a_{n}$. In principle this can be used to solve the DE to arbitrary precision by simply computing more and more terms of the series. We have:
$$
y(x) = \sum_{n=0}^{\infty}a_{n}x^n\implies y'(x) = \sum_{n=0}^{\infty}na_{n}x^{n-1}\implies y''(x) = \sum_{n=0}^{\infty}n(n-1)a_{n}x^{n-2}
$$
Note that the first two terms in the series of $y''(x)$ are zero, so we can rewrite the series as
$$
y''(x) = \sum_{n=2}^{\infty}n(n-1)a_{n}x^{n-2}= \sum_{n=0}^{\infty}(n+1)(n+2)a_{n+2}x^{n}
$$
Sub these into the DE:
$$
\sum_{n=0}^{\infty}(n+1)(n+2)a_{n+2}x^{n} + (x+1)\sum_{n=0}^{\infty}a_{n}x^n=0 \\
\sum_{n=0}^{\infty}(n+1)(n+2)a_{n+2}x^{n} + \sum_{n=0}^{\infty}a_{n}x^{n+1}+\sum_{n=0}^{\infty}a_{n}x^{n}=0
$$
We need to get all the powers of $x$ to be the same to match up the coefficients. By pulling the first term of the the first and third sum, we have:
$$
2a_{2}+\sum_{n=1}^{\infty}(n+1)(n+2)a_{n+2}x^{n} + \sum_{n=0}^{\infty}a_{n}x^{n+1}+a_{0}+\sum_{n=1}^{\infty}a_{n}x^{n}=0 \\
a_{0}+2a_{2}+\sum_{n=0}^{\infty}(n+2)(n+3)a_{n+3}x^{n+1} + \sum_{n=0}^{\infty}a_{n}x^{n+1}+a_{0}+\sum_{n=0}^{\infty}a_{n+1}x^{n+1}=0 \\ 
a_{0}+2a_{2}+\sum_{n=0}^{\infty}\big((n+2)(n+3)a_{n+3} + a_{n}+a_{n+1}\big)x^{n+1}=0
$$
Now, in order for ths to be zero, we need $a_{0}+2a_{2}=0$ and $(n+2)(n+3)a_{n+3} + a_{n}+a_{n+1} = 0$ for all $n$. Your initial conditions immediately imply that $a_{0}=0$ and $a_{1}=1$, so we must have $a_{2}=0$. Now, consider the recurrance relation with $n=0$, this gives:
$$
6a_{3} + a_{0}+a_{1} = 0\implies a_{3}=-1/6
$$
For $n=1$: $12a_{4} + a_{1}+a_{2} = 0\implies a_{4}=-1/12$. This procedure can be carried out indefinately. The fourth-order approximation (at zero) is thus $y(x)\approx x -\frac{1}{6}x^3 - \frac{1}{12}x^4$ (I would probably take a few more terms to make sure the approximation is still decent at $x=1$.)
In response to your edit:
$y(0) = 0\implies a_{0}=0\implies a_{2}=0$ (as above) and $y'(1) = 1 \implies \sum_{n=1}^{\infty}na_{n} = 1.$ Say we want a fourth-order approximation (as above.) Then we have $a_{1} + 2a_{2} + 3a_{3} + 4a_{4}=1\implies a_{1}+3a_{3}+4a_{4}=1$. Taking $n=0$ and $n=1$ gives the following set of equations:
$$
a_{1} + 3a_{3} + 4a_{4}=1 \\
a_{1} + 6a_{3} = 0 \\
a_{1} + 12a_{4} = 0
$$
Solving gives $a_{1} =6, a_{3} = -1, a_{4} = -1/2$. The new approximation is thus $y(x) \approx 6x - x^{3} - \frac{1}{2}x^4$. 
Disclaimer: This approximation is bad. Like, really bad. You'd need to take many more terms to get accuracy comparable to the first situation.
