ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Finite-difference Fokker–Planck update

The PDE transports probability with drift and spreads it with diffusion. The code applies centered first and second differences on an equally spaced grid, then one explicit time step. Stability, nonnegative densities, and total-mass preservation require suitable step…

Implementation mathematicsSource recovered; runtime not executed
Learn with the Atlas

Learn to read this model

Start with the symbols, follow the operations, and check what the result means.

Open guided lesson
gh-eq-c570e3872c200b1bsource-comment-equation
∂p/∂t=−∂(μp)/∂x+(1/2)∂2(σ2p)/∂x2∂p/∂t = -∂(μp)/∂x + (1/2)∂²(σ²p)/∂x²

Read the equation

The PDE transports probability with drift and spreads it with diffusion. The code applies centered first and second differences on an equally spaced grid, then one explicit time step. Stability, nonnegative densities, and total-mass preservation require suitable step sizes and boundary treatment; copying adjacent endpoint values is not generally a zero-flux reflecting condition when drift is nonzero.

Terms & definitions

TermMeaning in this source
p

Density values

mu

Constant drift

sigma

Constant diffusion scale

dx

Grid spacing

dt

Time step

How it works

Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.

Assumptions & limits

Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.

Original context

Read the surrounding source passage
// GeometricBrownian computes GBM step
// dS = μS·dt + σS·dW
func GeometricBrownian(s, mu, sigma, dt, dw float64) float64 {
	return s * (1.0 + mu*dt + sigma*dw)
}

// FokkerPlanck computes probability density evolution
// ∂p/∂t = -∂(μp)/∂x + (1/2)∂²(σ²p)/∂x²
func FokkerPlanck(p []float64, mu, sigma, dt, dx float64) []float64 {
	n := len(p)
	if n < 3 {
		return p
	}

	result := make([]float64, n)
	sigma2 := sigma * sigma

	for i := 1; i < n-1; i++ {
Exact original notation
∂p/∂t = -∂(μp)/∂x + (1/2)∂²(σ²p)/∂x²

Related builds

Sources & provenance

01
Go mathematical helpers
Lines 157–157 · 33aa84f2aa61
02
Go mathematical helpers
Lines 157–157 · 33aa84f2aa61

Search equations, builds, manuscript text, and recovered sources.