User Guide
Learn how to use Calcora effectively for mathematical computations.
Getting Started
Calcora offers three ways to get started:
- Web Demo: Try it instantly at calcoralive.netlify.app/demo
- Desktop App: Download the Windows app for offline use
- Python Package: Install via
pip install calcora
Differentiation
Compute derivatives with step-by-step explanations.
Basic Example
differentiate("x**2 + 3*x", "x") verbosity="detailed" for educational explanations showing each rule applied.
Supported Functions
- Polynomials:
x**n - Trigonometric:
sin(x),cos(x),tan(x) - Exponential:
exp(x),e**x - Logarithmic:
log(x),ln(x) - Inverse trig:
asin(x),acos(x),atan(x)
Integration
Compute indefinite and definite integrals with visual representations and step-by-step solutions.
Indefinite Integral (Antiderivative)
# Find ∫x² dx
from calcora import integrate
result = integrate("x**2", "x")
print(result['output']) # "x**3/3 + C" Definite Integral (Area Under Curve)
# Calculate ∫₀² x² dx
result = integrate(
expression="x**2",
variable="x",
lower_limit=0,
upper_limit=2
)
print(result['output']) # "8/3" (approximately 2.667) Integration Techniques Supported
- Power Rule:
∫xⁿ dx = x^(n+1)/(n+1) + C - Trigonometric: sin, cos, tan, sec, csc, cot
- Exponential:
∫eˣ dx = eˣ + C - Logarithmic:
∫1/x dx = ln|x| + C - Integration by Parts:
∫u dv = uv - ∫v du - U-Substitution: Chain rule in reverse
- Partial Fractions: For rational functions
- Trig Substitution: For expressions with √(a² - x²)
generate_graph=true to get visualization data showing the integrand curve, antiderivative, and shaded area (for definite integrals).
Common Integrals
# Trigonometric
integrate("sin(x)", "x") # -cos(x) + C
# Exponential
integrate("exp(x)", "x") # exp(x) + C
# Rational
integrate("1/x", "x") # ln|x| + C
# Product requiring integration by parts
integrate("x*exp(x)", "x") # x*exp(x) - exp(x) + C
# Area calculation
integrate("sin(x)", "x", 0, 3.14159) # Area = 2 Matrix Operations
Perform matrix calculations including determinants, inverses, eigenvalues, and RREF with detailed step-by-step explanations.
Determinant
Calculate the determinant of a square matrix:
from calcora import matrix_determinant
matrix = [[3, 8], [4, 6]]
result = matrix_determinant(matrix)
print(result['result']) # -14 Matrix Inverse
Find the inverse of a matrix (if it exists):
from calcora import matrix_inverse
matrix = [[1, 2], [3, 4]]
result = matrix_inverse(matrix)
print(result['result']) # [[-2, 1], [1.5, -0.5]] Eigenvalues and Eigenvectors
Compute eigenvalues and eigenvectors:
from calcora import matrix_eigenvalues
matrix = [[2, 1], [1, 2]]
result = matrix_eigenvalues(matrix)
print(result['eigenvalues']) # [3, 1]
print(result['eigenvectors']) # [[0.707, 0.707], [-0.707, 0.707]] Row Reduction (RREF)
Reduce a matrix to row echelon form:
from calcora import matrix_rref
# Solve system: 2x + y = 5, x - y = 1
augmented = [[2, 1, 5], [1, -1, 1]]
result = matrix_rref(augmented)
print(result['result']) # [[1, 0, 2], [0, 1, 1]]
# Solution: x = 2, y = 1 LU Decomposition
Factor a matrix into lower and upper triangular forms with partial pivoting: PA = LU
from calcora import matrix_lu
matrix = [[2, 1, 1], [4, -6, 0], [-2, 7, 2]]
result = matrix_lu(matrix)
print(result['P']) # Permutation matrix
print(result['L']) # Lower triangular (1s on diagonal)
print(result['U']) # Upper triangular Verification
The decomposition satisfies: PA = LU
- P records row swaps for numerical stability
- L stores the elimination multipliers
- U is the result of Gaussian elimination
Use Cases
- Determinants: Check if matrix is invertible, compute volumes
- Inverses: Solve matrix equations Ax = b
- Eigenvalues: Find principal components, analyze stability
- RREF: Solve linear systems, test linear independence
- LU Decomposition: Efficiently solve systems with multiple right-hand sides, compute determinants
Common Examples Library
Real-world problems you can solve with Calcora:
Physics & Engineering
# Velocity from position function s(t) = 3t² + 2t
differentiate("3*t**2 + 2*t", "t") # v(t) = 6t + 2
# Work done by force F = x² over distance 0 to 5
integrate("x**2", "x", 0, 5) # W = 41.67 J
# Area under normal distribution curve (standard)
integrate("exp(-x**2/2)", "x", -1, 1) # ≈ 0.683 (68.3%) Economics & Finance
# Marginal cost from total cost C(x) = 100 + 50x + 0.5x²
differentiate("100 + 50*x + 0.5*x**2", "x") # MC = 50 + x
# Consumer surplus with demand function p = 100 - 2q
integrate("100 - 2*q", "q", 0, 25) # Surplus = 1875
# Present value of continuous income stream
integrate("1000*exp(-0.05*t)", "t", 0, 10) # PV ≈ $7,869 Calculus Practice Problems
# Chain rule: d/dx[sin(x²)]
differentiate("sin(x**2)", "x") # 2x·cos(x²)
# Product rule: d/dx[x·ln(x)]
differentiate("x*log(x)", "x") # ln(x) + 1
# Integration by parts: ∫x·eˣ dx
integrate("x*exp(x)", "x") # x·eˣ - eˣ + C
# Partial fractions: ∫(3x+1)/(x²-1) dx
integrate("(3*x+1)/(x**2-1)", "x") # 2·ln|x-1| + ln|x+1| + C Advanced Techniques
# Trig substitution: ∫√(1-x²) dx
integrate("sqrt(1-x**2)", "x") # (x·√(1-x²) + arcsin(x))/2 + C
# Rational function with u-substitution
integrate("x/(x**2+1)", "x") # (1/2)·ln(x²+1) + C
# Logarithmic integration
integrate("log(x)", "x") # x·ln(x) - x + C Error Messages & Troubleshooting
Understanding common errors and how to fix them:
Problem: Using
^ instead of ** for exponentiationFix:
x^2 → x**2 Problem: Expression requires advanced methods (e.g., trig substitution for complex radicals)
Fix: Try simplifying, or check if SymPy can handle it directly
Problem: Cannot compute inverse because matrix is not invertible
Fix: Verify matrix entries; singular matrices have linearly dependent rows
Meaning: Expression was too complex for step explanations, but result is correct
Context: Happens with highly nested compositions or transcendental combinations
Tips & Tricks
Input Syntax
- Use
**for exponentiation (not^):x**3 - Wrap function arguments in parentheses:
sin(x), notsinx - Multiplication is explicit:
2*x, not2x - Natural log: Use
log(x)orln(x) - Square root:
sqrt(x)orx**0.5
Verbosity Modes
verbosity="concise"— Quick answer only (exams, homework checks)verbosity="detailed"— Step-by-step (learning, studying)verbosity="teacher"— Ultra-detailed with rule names (teaching)
Performance Tips
- Simplify before computing:
(x**2 - 1)/(x-1)→x+1(if x≠1) - Keep matrix size under 5×5 for fast symbolic operations
- Use numeric limits when possible:
integrate(f, x, 0, 1)is faster than indefinite
Symbolic Variables
- Matrices with symbols:
[["a", "b"], ["c", "d"]] - Parametric expressions:
"a*x**2 + b*x + c" - Constants:
pi,e,I(imaginary unit)
Next Steps
- 📘 API Reference — Complete endpoint documentation
- 🎮 Try Live Demo — Interactive browser playground
- 📝 Changelog — Version history and updates
- 🔨 Build from Source — Compile desktop app yourself
- 💻 GitHub Repository — Source code and issue tracker