@sym: partfrac (f) ¶@sym: partfrac (f, x) ¶Compute partial fraction decomposition of a rational function.
Examples:
syms x
f = 2/(x + 4)/(x + 1)
⇒ f = (sym)
2
───────────────
(x + 1)⋅(x + 4)
partfrac(f)
⇒ ans = (sym)
2 2
- ───────── + ─────────
3⋅(x + 4) 3⋅(x + 1)
Other examples:
syms x y
partfrac(y/(x + y)/(x + 1), x)
⇒ ans = (sym)
y y
- ─────────────── + ───────────────
(x + y)⋅(y - 1) (x + 1)⋅(y - 1)
partfrac(y/(x + y)/(x + 1), y)
⇒ ans = (sym)
x 1
- ─────────────── + ─────
(x + 1)⋅(x + y) x + 1
See also: @@sym/factor.
Package: symbolic