All Projects → JuliaMath → Calculus.jl

JuliaMath / Calculus.jl

Licence: other
Calculus functions in Julia

Programming Languages

julia
2034 projects

Labels

Projects that are alternatives of or similar to Calculus.jl

Expreduce
An experimental computer algebra system written in Go
Stars: ✭ 318 (+58.21%)
Mutual labels:  calculus
Fractional Differentiation Time Series
As described in Advances of Machine Learning by Marcos Prado.
Stars: ✭ 78 (-61.19%)
Mutual labels:  calculus
Symja android library
☕️ Symja - computer algebra language & symbolic math library. A collection of popular algorithms implemented in pure Java.
Stars: ✭ 170 (-15.42%)
Mutual labels:  calculus
Newton Api
➗ A really micro micro-service for advanced math.
Stars: ✭ 358 (+78.11%)
Mutual labels:  calculus
Ncalc
Power calculator for Android. Solve some problem algebra and calculus.
Stars: ✭ 512 (+154.73%)
Mutual labels:  calculus
Lazysets.jl
A Julia package for calculus with convex sets
Stars: ✭ 107 (-46.77%)
Mutual labels:  calculus
Machine Learning Curriculum
Complete path for a beginner to become a Machine Learning Scientist!
Stars: ✭ 279 (+38.81%)
Mutual labels:  calculus
Quant Notes
Quantitative Interview Preparation Guide, updated version here ==>
Stars: ✭ 180 (-10.45%)
Mutual labels:  calculus
Mathparser.org Mxparser
Math Parser Java Android C# .NET/MONO (.NET Framework, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS) CLS Library - a super easy, rich and flexible mathematical expression parser (expression evaluator, expression provided as plain text / strings) for JAVA and C#. Main features: rich built-in library of operators, constants, math functions, user defined: arguments, functions, recursive functions and general recursion (direct / indirect). Additionally parser provides grammar and internal syntax checking.
Stars: ✭ 624 (+210.45%)
Mutual labels:  calculus
Calc4b Zh
📖 [译] MIT 18.03 面向初学者的微积分
Stars: ✭ 114 (-43.28%)
Mutual labels:  calculus
The Math Of Intelligence
List of resources & possible pathway for the Math of Machine Learning and AI.
Stars: ✭ 370 (+84.08%)
Mutual labels:  calculus
Forwarddiff.jl
Forward Mode Automatic Differentiation for Julia
Stars: ✭ 466 (+131.84%)
Mutual labels:  calculus
Stanford Cme 102 Ordinary Differential Equations
VIP cheatsheets for Stanford's CME 102 Ordinary Differential Equations for Engineers
Stars: ✭ 109 (-45.77%)
Mutual labels:  calculus
Nerdamer
a symbolic math expression evaluator for javascript
Stars: ✭ 322 (+60.2%)
Mutual labels:  calculus
Computator.net
Computator.NET is a special kind of numerical software that is fast and easy to use but not worse than others feature-wise. It's features include: - Real and complex functions charts - Real and complex calculator - Real functions numerical calculations including different methods - Over 107 Elementary functions - Over 141 Special functions - Over 21 Matrix functions and operations - Scripting language with power to easy computations including matrices - You can declare your own custom functions with scripting language
Stars: ✭ 174 (-13.43%)
Mutual labels:  calculus
Basic Mathematics For Machine Learning
The motive behind Creating this repo is to feel the fear of mathematics and do what ever you want to do in Machine Learning , Deep Learning and other fields of AI
Stars: ✭ 300 (+49.25%)
Mutual labels:  calculus
Hackermath
Introduction to Statistics and Basics of Mathematics for Data Science - The Hacker's Way
Stars: ✭ 1,380 (+586.57%)
Mutual labels:  calculus
Reversediff.jl
Reverse Mode Automatic Differentiation for Julia
Stars: ✭ 182 (-9.45%)
Mutual labels:  calculus
Data Science Masters
Self-study plan to achieve mastery in data science
Stars: ✭ 179 (-10.95%)
Mutual labels:  calculus
Precalc
This repo contains some code which can graph equations in a UIView.
Stars: ✭ 109 (-45.77%)
Mutual labels:  calculus

Calculus.jl

Build Status Coverage Status Calculus Calculus

Introduction

The Calculus package provides tools for working with the basic calculus operations of differentiation and integration. You can use the Calculus package to produce approximate derivatives by several forms of finite differencing or to produce exact derivative using symbolic differentiation. You can also compute definite integrals by different numerical methods.

API

Most users will want to work with a limited set of basic functions:

  • derivative(): Use this for functions from R to R
  • second_derivative(): Use this for functions from R to R
  • Calculus.gradient(): Use this for functions from R^n to R
  • hessian(): Use this for functions from R^n to R
  • differentiate(): Use this to perform symbolic differentiation
  • simplify(): Use this to perform symbolic simplification
  • deparse(): Use this to get usual infix representation of expressions

Usage Examples

There are a few basic approaches to using the Calculus package:

  • Use finite-differencing to evaluate the derivative at a specific point
  • Use higher-order functions to create new functions that evaluate derivatives
  • Use symbolic differentiation to produce exact derivatives for simple functions

Direct Finite Differencing

using Calculus

# Compare with cos(0.0)
derivative(sin, 0.0)
# Compare with cos(1.0)
derivative(sin, 1.0)
# Compare with cos(pi)
derivative(sin, float(pi))

# Compare with [cos(0.0), -sin(0.0)]
Calculus.gradient(x -> sin(x[1]) + cos(x[2]), [0.0, 0.0])
# Compare with [cos(1.0), -sin(1.0)]
Calculus.gradient(x -> sin(x[1]) + cos(x[2]), [1.0, 1.0])
# Compare with [cos(pi), -sin(pi)]
Calculus.gradient(x -> sin(x[1]) + cos(x[2]), [float64(pi), float64(pi)])

# Compare with -sin(0.0)
second_derivative(sin, 0.0)
# Compare with -sin(1.0)
second_derivative(sin, 1.0)
# Compare with -sin(pi)
second_derivative(sin, float64(pi))

# Compare with [-sin(0.0) 0.0; 0.0 -cos(0.0)]
hessian(x -> sin(x[1]) + cos(x[2]), [0.0, 0.0])
# Compare with [-sin(1.0) 0.0; 0.0 -cos(1.0)]
hessian(x -> sin(x[1]) + cos(x[2]), [1.0, 1.0])
# Compare with [-sin(pi) 0.0; 0.0 -cos(pi)]
hessian(x -> sin(x[1]) + cos(x[2]), [float64(pi), float64(pi)])

Higher-Order Functions

using Calculus

g1 = derivative(sin)
g1(0.0)
g1(1.0)
g1(pi)

g2 = Calculus.gradient(x -> sin(x[1]) + cos(x[2]))
g2([0.0, 0.0])
g2([1.0, 1.0])
g2([pi, pi])

h1 = second_derivative(sin)
h1(0.0)
h1(1.0)
h1(pi)

h2 = hessian(x -> sin(x[1]) + cos(x[2]))
h2([0.0, 0.0])
h2([1.0, 1.0])
h2([pi, pi])

Symbolic Differentiation

using Calculus

differentiate("cos(x) + sin(x) + exp(-x) * cos(x)", :x)
differentiate("cos(x) + sin(y) + exp(-x) * cos(y)", [:x, :y])

Numerical Integration

The Calculus package no longer provides routines for univariate numerical integration. Use QuadGK.jl instead.

Credits

Calculus.jl is built on contributions from:

  • John Myles White
  • Tim Holy
  • Andreas Noack Jensen
  • Nathaniel Daw
  • Blake Johnson
  • Avik Sengupta
  • Miles Lubin

And draws inspiration and ideas from:

  • Mark Schmidt
  • Jonas Rauch
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].