Code For Finite Difference Method and Shooting Method
This document provides code to solve a boundary value problem using two different methods: finite difference method and shooting method. The boundary value problem is -y''(x)=x(1-x), 0<x<1, with boundary conditions y(0)=A, y(1)=B. The finite difference method solves the problem directly, while the shooting method uses a root-finding algorithm to determine the initial condition that satisfies the boundary conditions.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
43 views
Code For Finite Difference Method and Shooting Method
This document provides code to solve a boundary value problem using two different methods: finite difference method and shooting method. The boundary value problem is -y''(x)=x(1-x), 0<x<1, with boundary conditions y(0)=A, y(1)=B. The finite difference method solves the problem directly, while the shooting method uses a root-finding algorithm to determine the initial condition that satisfies the boundary conditions.