# Numerical Solutions for Mixed Boundary Condition

by tau1777
Tags: mixed b.c., numerical int, robin b.c.
 HW Helper P: 1,583 Numerical Solutions for Mixed Boundary Condition Essentially that is the thing I am saying, the only other thing is the BC on the boundary, so split your interval up into N pieces and you want to know how to compute your derivative on the boundary point $x_{N}$. The wa yto go about this is to examine the point $x_{N-\frac{1}{2}}$. The derivative is given by: $$\frac{dy}{dx}\Big|_{x_{N-\frac{1}{2}}}=\frac{y_{N}-y_{N-1}}{h}$$ Now the value of the derivative at $N-1/2$ is approximately the average of the derivatives at each side, so: $$\frac{dy}{dx}\Big|_{x_{N-\frac{1}{2}}}=\frac{1}{2}\left(\frac{dy}{dx}\Big|_{x_{N}}+\frac{dy}{dx} \Big|_{x_{N-1}}\right)$$ Then you use: $$\frac{dy}{dx}\Big|_{x_{N-1}}=\frac{y_{N}-y_{N-2}}{2h}$$ You solve for the thing you want $$\frac{dy}{dx}\Big|_{x_{N}}=\frac{3y_{N}-4y_{N-1}+y_{N-2}}{2h}$$ I have sent you my programs.