01 Key Concepts
Symbolic vs. Numeric Computation
Numeric computation gives approximate decimal answers (like 1.41421...); symbolic computation keeps exact forms (like sqrt(2)).
Defining Symbols
Use sp.symbols('x') to create a symbolic variable that SymPy can manipulate algebraically, rather than treating it as a specific number.
Simplifying and Expanding Expressions
sp.expand() multiplies out expressions like (x+1)**2; sp.simplify() reduces an expression to its simplest equivalent form.
Solving Equations
sp.solve(equation, variable) finds exact symbolic solutions to equations, including ones with no simple algebraic shortcut.
Calculus with SymPy
sp.diff() computes derivatives symbolically, and sp.integrate() computes integrals symbolically -- both giving exact, not approximate, results.
02 Key Formulas
- sp.symbols('x') creates a symbolic variable
- sp.solve(eq, x) solves an equation for x
- sp.diff(expr, x) differentiates expr with respect to x
03 Solved Examples
- Expanding (x+1)^2 algebraically gives x^2 + 2x + 1.
- Solve x^2-4=0 algebraically: x^2=4, so x=2 or x=-2.
- Apply the power rule symbolically: d/dx[x^3] = 3x^2.
04 Practice Questions
๐ SymPy โ Downloadable Worksheet
10 questions with a full answer key. Grab the PDF to print, or try the interactive version in your browser.