"Breaking up" a fraction

5 views
Skip to first unread message

Alasdair

unread,
Jun 12, 2025, 1:29:22 AMJun 12
to FriCAS - computer algebra system
I haven't used FriCAS for a very long time, and I've forgotten how to do almost everything.  For example, the command

integrate(x*tan(x)^4, x = 0..%pi/4,"noPole")

results in an expression which is a large fraction, the numerator consisting of powers of %pi, ln(2), and the denominator being 96.

All I want to do is to break it up into 4 simple fractions:

%pi^2/32 - %pi/6 + 2*ln(2)/3 -1/6

How can I do this?  And with apologies for such a simple question.

Alasdair


Ralf Hemmecke

unread,
Jun 12, 2025, 2:30:22 AMJun 12
to fricas...@googlegroups.com
In this case the following works:

%%% (217) -> )type on

%%% (217) -> foo := integrate(x*tan(x)^4, x = 0..%pi/4,"noPole")

2
64 log(2) + 3 %pi - 16 %pi - 16
(217) --------------------------------
96
Type: Union(f1: OrderedCompletion(Expression(Integer)),...)

%%% (218) -> foo::Expression(Fraction Integer)

2 1 2 1 1
(218) - log(2) + -- %pi - - %pi - -
3 32 6 6
Type: Expression(Fraction(Integer))

In general, I think, it is not that easy.

Ralf
Reply all
Reply to author
Forward
0 new messages