Since yesterday I’m trying to use the free software SAGE(math) for the computation of my current research, so the problems don’t wait… they appear at each corner.

I’d like to thank to the people of the **IRC** channel *#sage-devel*.

## Issue 1.

Today I wanted to simplify a expression, say with a number.

First issue, declare the variables… and try the simplest one

sage: a, x = var('a,x') sage: simplify(e^(a*log(x))) e^(a*log(x))

i.e., I got nothing.

## Solution.

Somehow, the best way for doing simplifications is the Python way. How is it?

Give a name to your expression, and then simplify (with the exponential option)

sage: ex = e^(a*log(x)) sage: ex.simplify_exp() x^a

so you get the right answer, .

Besides the exponential simplification option, there are trigonometric (simplify_trig), logarithmic (simplify_log), rational… and many others. If you’re using the Interactive shell, the auto-completion will help you.

## Issue 2.

As you may know, when using symbolic calculation software, the declaration of assumptions is pretty important. How do we do it in Sage(math)?

## Solution.

The command is assume, so if your variable is positive,

sage: assume(a > 0)

or if your variable is an integer,

sage: assume(a, 'integer')

in the latter also rational, real, odd and even works.

Ordered assumptions works, say

sage: assume(x<y, y<z)

For seen all the assumptions use the assumptions command,

sage: assumptions()

and for eliminate them, use the command forget

sage: forget()

That’s the main of it…

## Leave a Reply