MathProblemsBank

14.7.1 Approximate solution of differential equations

Problem: Find a solution to the boundary value problem, using the finite difference method. \( \left\{\begin{array}{c}-y^{\prime \prime}+q(x) y=f(x) \\ y(0)=y_{0}, \quad y(1)=y_{1}\end{array} \quad\right. \) with steps \( h_{1}=\frac{1}{3}, \quad h_{2}=\frac{1}{6} \) and estimate the error by the Runge rule. Plot the graphs of the obtained approximate solutions. \begin{tabular}{|c|c|c|c|c|} \hline \( \mathrm{N} \) & \( q(x) \) & \( f(x) \) & \( y_{0} \) & \( y_{1} \) \\ \hline 11 & 1 & \( 1+6 x-x^{3} \) & 1 & 0 \\ \hline \end{tabular}