From 2cc01c3a863857a9affaea4125a80894c0af0fa1 Mon Sep 17 00:00:00 2001 From: Lucas <54046842+macquarrielucas@users.noreply.github.com> Date: Fri, 24 Jan 2025 15:21:27 -0400 Subject: [PATCH] Included definition of v in this example Previously v was left undefined in this example. I added the system of ODEs you can from this second order differential equation so that readers know that v is. Perhaps this is obvious from physics perspective but not necessarily from other practices. --- docs/src/examples/tensor_layer.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/src/examples/tensor_layer.md b/docs/src/examples/tensor_layer.md index 4bb7e3cae..78871b6eb 100644 --- a/docs/src/examples/tensor_layer.md +++ b/docs/src/examples/tensor_layer.md @@ -9,6 +9,13 @@ Let's consider the anharmonic oscillator described by the ODE ẍ = - kx - αx³ - βẋ -γẋ³. ``` +We first transform this second order differential equation into a system of first order +differential equations for use in `DiffEqFlux`: We let `ẋ = v` then +```math +ẋ = v \\ +v̇ = - kx - αx³ - βv̇ -γv̇³. +``` + To obtain the training data, we solve the equation of motion using one of the solvers in `DifferentialEquations`: