Skip to content

Commit 84d79a2

Browse files
Fix Van der Pol Jacobian calculation
The partial derivative ∂f₂/∂x was incorrect. For the Van der Pol equation: f₂ = μ * ((1 - x²) * y - x) The correct partial derivative is: ∂f₂/∂x = μ * (-2xy - 1) The previous implementation was missing the y term in the derivative. This fixes the failing test in OrdinaryDiffEq.jl CI. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c35dd8b commit 84d79a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ODEProblemLibrary/src/ode_simple_nonlinear_prob.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function vanderpol_jac(J, u, p, t)
6363
y = u[2]
6464
μ = p[1]
6565
J[1,1] = 0
66-
J[2,1] = -2μ*x - 1
66+
J[2,1] = μ * (-2*x*y - 1)
6767
J[1,2] = 1
6868
J[2,2] = μ * (1 - x^2)
6969
end

0 commit comments

Comments
 (0)