# numerically solving differential equations

$\frac{d^2 \theta}{dx^2} (1 + \beta \theta) + \beta \left(\frac{d \theta}{d x}\right)^2 - m^2 \theta = 0$

Boundary Conditions $\theta=100$ at $x = 0$, $\frac{d\theta}{dx} = 0$ at $x = 2$

$\beta$ and $m$ are constants. Please help me solve this numerically (using finite difference). The squared term is really complicating things! Thank You!

-
What have you tried already? Also, is this a homework question? If yes, please state this. – Johannes Kloos Mar 15 '12 at 16:07
av tried alot actually... infact i solved analytically to a considerable stage but solving numerically has been a challenge. – fagbenro olayiwola Mar 15 '12 at 16:36
av tried alot actually d latest being nonlinear FDE approach using iteration(lagging)... but the squared term is given me a problem. Also is d differential boundary condition – fagbenro olayiwola Mar 15 '12 at 16:48
It also helps to post this question on physics.stackexchange.com – Kirthi Raman Mar 15 '12 at 16:54
thks Kirthi...jus did that! – fagbenro olayiwola Mar 15 '12 at 17:16

Choose an integer $N$, let $h=2/N$ and let $\theta_k$ be the approximation given by the finite difference method to the exact value $\theta(k\,h)$, $0\le k\le N$. We get the system of $N-1$ equations $$\frac{\theta_{k+1}-2\,\theta_k+\theta_{k-1}}{h^2}(1+\beta\,\theta_k)+\beta\,\Bigl(\frac{\theta_k-\theta_{k-1}}{h}\Bigr)^2-m^2\,\theta_k=0,\quad 1\le k\le N-1\tag1$$ complemented with two more coming from the boundary conditions: $$\theta_0=100,\quad \theta_N-\theta_{N-1}=0.$$ I doubt that this nonlinear system can be solved explicitly.
Choose a starting value $\theta_N=a$. The system (1) can be solved recursively, obtaining at the end a value $\theta_0=\theta_0(a)$. If $\theta_0(a)=100$, you are done. If not, change the value of $a$ and repeat the process. Your first goal is to find two values $a_1$ and $a_2$ such that $\theta_0(a_1)<100<\theta_0(a_2)$. Then use the bissection method to approximate a value of $a$ such that $\theta_0(a)=100$.