Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration and differentiation support in the expression compiler #512

Open
crowlogic opened this issue Oct 3, 2024 · 0 comments
Open

Comments

@crowlogic
Copy link
Owner

we need distinct notations and to include the Riemann-Liouville fractional integral. Here's the revised, complete table with standard derivatives, integrals, Caputo fractional derivatives, and Riemann-Liouville fractional integrals:

'''

Node Type Standard Derivative Standard Integral Caputo Fractional Derivative (D_C^α) Riemann-Liouville Fractional Integral (I^α)
Constant (c) 0 cx + C 0 (c/Γ(α))x^(α-1)
Variable (x) 1 (1/2)x² + C x^(1-α) / Γ(2-α) x^(α) / Γ(α+1)
Addition (f + g) f' + g' ∫f dx + ∫g dx D_C^α f + D_C^α g I^α f + I^α g
Subtraction (f - g) f' - g' ∫f dx - ∫g dx D_C^α f - D_C^α g I^α f - I^α g
Multiplication (f * g) f'g + fg' ∫f dg + ∫g df 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[f(t)g(t)] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) f(t)g(t) dt
Division (f / g) (f'g - fg') / g² Complex 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[f(t)/g(t)] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) (f(t)/g(t)) dt
Power (x^n) nx^(n-1) x^(n+1) / (n+1) + C x^(n-α) / Γ(n-α+1) x^(n+α) / Γ(n+α+1)
Exponential (e^x) e^x e^x + C 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[e^t] dt x^(α-1) E_(1,α)(x)
Natural Log (ln(x)) 1/x x ln(x) - x + C 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[ln(t)] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) ln(t) dt
Sine (sin(x)) cos(x) -cos(x) + C 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[sin(t)] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) sin(t) dt
Cosine (cos(x)) -sin(x) sin(x) + C 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[cos(t)] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) cos(t) dt
Tangent (tan(x)) sec²(x) -ln|cos(x)| + C 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[tan(t)] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) tan(t) dt
Square root (√x) 1 / (2√x) (2/3)x^(3/2) + C 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[√t] dt 1/Γ(α) ∫_0^x (x-t)^(α-1) √t dt
'''

Where:

  • α is the order of the fractional operation (0 < α < 1 for fractional derivatives)
  • n = ⌈α⌉ (ceiling of α)
  • Γ is the Gamma function
  • E_(a,b)(z) is the Mittag-Leffler function

For composite functions f(g(x)):

  • Standard Derivative: f'(g(x)) * g'(x)
  • Standard Integral: Requires substitution u = g(x)
  • Caputo Fractional Derivative: 1/Γ(n-α) ∫_0^x (x-t)^(n-α-1) d^n/dt^n[f(g(t))] dt
  • Riemann-Liouville Fractional Integral: 1/Γ(α) ∫_0^x (x-t)^(α-1) f(g(t)) dt

This table now correctly distinguishes between all types of operations and provides the complete set of formulas you requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant