what does it mean when Fricas returns list from Integrate command?

3 views
Skip to first unread message

Nasser M. Abbasi

unread,
Jun 27, 2022, 1:29:57 AM6/27/22
to FriCAS - computer algebra system
1.3.8

r:=integrate(1/((b*sin(f*x + e) + a)^2*(d*sin(f*x + e) + c)),x);

Returns list of 4 elements:

 indices(r)
  [1, 2, 3, 4]

So it returns 4 different antiderivatives?

btw, is there a direct way to find length of list in Fricas? I looked at https://fricas.github.io/api/List.html  and can find a "Length" like commnd. May be I overlooked it.

Thanks
--Nasser



Ralf Hemmecke

unread,
Jun 27, 2022, 2:00:06 AM6/27/22
to fricas...@googlegroups.com
(231) -> list := [2,4,7]

(231) [2, 4, 7]
(232) -> # list

(232) 3

Waldek Hebisch

unread,
Jun 27, 2022, 7:29:01 AM6/27/22
to 'Nasser M. Abbasi' via FriCAS - computer algebra system
On Sun, Jun 26, 2022 at 10:29:56PM -0700, 'Nasser M. Abbasi' via FriCAS - computer algebra system wrote:
> 1.3.8
>
> r:=integrate(1/((b*sin(f*x + e) + a)^2*(d*sin(f*x + e) + c)),x);
>
> Returns list of 4 elements:
>
> indices(r)
> [1, 2, 3, 4]
>
> So it returns 4 different antiderivatives?

Yes. Derivative contains "rational term" (for which there is
less need for variation) and "logarithmic terms". Logaritmic
terms can be written in different ways, in particular in
form involving 'atan'. It is for user to decide which one
is preferable (say real in area of interest).

The integral above contains two logarithmic terms, depending
on sign of 'a^2 - b^2' and 'c^2 - d^2' respectivly 'atan'
form is real. Since there are two logarithmic terms this
leads to 4 possible results.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages