How to get Maxima to collapse expressions with i^2

895 Views Asked by At

Example from attempting to reproduce https://en.wikipedia.org/wiki/Butterworth_filter#Example:

I've got Maxima to generate:

1/abs(%i*omega^3+2*omega^2-2*%i*omega-1)^2

$$\frac{1}{{{\left| i {{\omega}^{3}}+2 {{\omega}^{2}}-2 i \omega-1\right| }^{2}}}$$

which is equivalent to

$$1 \over ω^6 + 1$$

if ω is positive, but how do I get Maxima to do this simplification?

I've tried declare(omega, real), assume(omega>0), ratsimp, trigsimp gfactor etc. etc. but nothing works.

Wolfram Alpha has no problem simplifying it

1

There are 1 best solutions below

1
On BEST ANSWER

Use cabs and expand the result.

Explanation (contributed by @endolith):

abs is a simplifying function

cabs is a routine.

The distinction is that abs is for when you want to express the concept of absolute value; cabs is for when you want to change the form of the expression to make it more explicit.