Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: bothcoef (<expr>, <x>) Returns a list whose first member is the coefficient of <x> in <expr> (as found by ratcoef if <expr> is in CRE form otherwise by coeff) and whose second member is the remaining part of <expr>. That is, [A, B] where <expr> = A*<x> + B.

Example:
(%i1) islinear (expr, x) := block ([c],
c: bothcoef (rat (expr, x), x),
is (freeof (x, c) and c[1] # 0))$
(%i2) islinear ((r^2 - (x - r)^2)/x, x);
(%o2) true(%o1) true (%i2)