Public
Edited
Feb 20, 2024
1 star
Insert cell
Insert cell
Insert cell
f = x => 4 + x / 3 + Math.sin(2 * x)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
u(1, 2)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
G = (x, t) => Math.exp(-(x ** 2) / (4 * t)) / Math.sqrt(4 * Math.PI * t)
Insert cell
function u(x, t) {
return integrate(y => f(y) * G(y - x, t), ab[0], ab[1]);
}
Insert cell
function integrate(ff, a, b) {
return adaptiveSimpson(ff, a, b, {
tolerance: 1e-11,
maxDepth: 8,
minDepth: 4
});
}
Insert cell
import { adaptiveSimpson } from '@rreusser/integration@3056'
Insert cell
import { Button, Range, Toggle } from '@observablehq/inputs'
Insert cell
import { rangeSlider, interval } from "@mootari/range-slider"
Insert cell
erf = (await import("https://cdn.jsdelivr.net/npm/@stdlib/esm@0.0.3/math/base/special/erf.js"))
.default
Insert cell
functionPlot = require("function-plot@1/dist/function-plot")
Insert cell
d3 = require('d3@6')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more