Two Point Boundary Value
Overview
Two point boundary value problems are second order ordinary differential equations of the form:
{% \frac{d^2y}{dx^2} + p(x)\frac{dy}{dx} + q(x)y = f(x) %}
{% y(0) = \alpha %}
{% y(L) = \beta %}
The function is specified on two points (the boundary points)
Solution
Example
The following example demonstrates uses a finite difference approximation to calculating the boundary value problem.
let fd = await import('/lib/numeric/finite-difference/v1.0.0/finite-difference.mjs');
let p = val => 0;
let q = val => -1;
let f = val => -1*Math.sin(2*3.14159*val);
let alpha = 0;
let beta = 0;
let answer = fd.linearbvp([0,1], 10, p, q, f, alpha, beta);
Try it!