Skip to content

Add advanced ODE solver cases#320

Draft
KingArth0r wants to merge 1 commit into
cortex-js:mainfrom
KingArth0r:codex/ode-next
Draft

Add advanced ODE solver cases#320
KingArth0r wants to merge 1 commit into
cortex-js:mainfrom
KingArth0r:codex/ode-next

Conversation

@KingArth0r

Copy link
Copy Markdown
Contributor

Summary

This adds several new symbolic DSolve paths while keeping the implementation scoped to the differential-equation solver:

  • Adds a shared replaceDerivativeOfDependent() helper in differential-equation-utils.ts for solver recognizers that need to rewrite derivative terms.
  • Adds Clairaut first-order support for equations of the form y = x y' + f(y').
  • Adds Riccati support when a constant particular solution can be verified, reducing the equation to the existing linear first-order machinery.
  • Adds constant-coefficient Abel first-kind support as an implicit separable solution when the antiderivative is available.
  • Adds second-order ordinary and modified Bessel equation recognition using CE's existing Bessel function support.
  • Adds focused tests for the new paths, including residual checks where CE can verify the returned explicit solution.

Notes

This intentionally does not claim general Riccati or Abel support. Riccati is limited to constant particular solutions for now; Abel support is limited to constant-coefficient first-kind equations where integration succeeds. The Bessel path uses existing special-function derivative support, which makes it more maintainable than emitting special-function solutions CE cannot verify.

Validation

  • npx jest --config ./config/jest.config.cjs test/compute-engine/differential-equations.test.ts --runInBand --reporters default
  • npx prettier --check src/compute-engine/differential-equation-utils.ts src/compute-engine/symbolic/differential-equations.ts test/compute-engine/differential-equations.test.ts

Both passed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant