Ask Your Question
1

Basic fraction manipulation functions? (neophyte question)

asked 2023-08-16 22:30:34 +0100

Smrz gravatar image

Somewhere I thought I saw a sage function that splits fractions, e.g.

(a + b)/c to a/c + b/c

I haven't been able to find anything like this in the online documentation. If this exists, does anyone know the function name?

In general, I'm having a hard time finding documentation on basic expression manipulation. E.g. I've used expr.collect(x) but I can't find documentation on it. Similarly for expr.op[0], x.substitute(a == b) and simplify(expr) I'd appreciate any suggestions re finding documentation on these sort of operations.

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-08-17 12:02:42 +0100

Emmanuel Charpentier gravatar image

Try :

sage: var("a, b, c")
(a, b, c)
sage: ((a+b)/c).expand()
a/c + b/c

As a neophyte, you should benefit geatly by reading this book...

HTH,

edit flag offensive delete link more

Comments

Thanks....

Smrz gravatar imageSmrz ( 2023-08-18 08:29:32 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-08-16 22:30:34 +0100

Seen: 106 times

Last updated: Aug 17 '23