Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error integrate with Fricas as algorithm fresnel_sin called #26755

Closed
nasser1 opened this issue Nov 24, 2018 · 8 comments
Closed

Error integrate with Fricas as algorithm fresnel_sin called #26755

nasser1 opened this issue Nov 24, 2018 · 8 comments

Comments

@nasser1
Copy link

nasser1 commented Nov 24, 2018

This ticket tracks the problem reported at

observed in SageMath 8.5.beta2:

sage: from sympy import fresnelc, fresnels
sage: var('b x')
sage: integrate(x^7*fresnels(b*x), x, algorithm="fricas")
Traceback (most recent call last)
...
TypeError: An error occurred when FriCAS evaluated '((x)^(7))*(fresnel_sin((b)*(x)))':
   There are no library operations named fresnel_sin
      Use HyperDoc Browse or issue
                              )what op fresnel_sin
      to learn if there is any operation containing " fresnel_sin " in its
      name.

   Cannot find a definition or applicable library operation named
      fresnel_sin with argument type(s)
                              Polynomial(Integer)

      Perhaps you should use "@" to indicate the required return type, or 
      "$" to specify which version of the function you need.

FriCAS does not have fresnel_sin but has fresnelS and fresnelC:

When running the same command inside Fricas 1.3.4 itself, it works OK

integrate(x^7*fresnelS(b*x),x)   

   (3)
                                    2     2
             5   2 5               b %pi x       8   4 8
       (- 7 b %pi x  + 105 b x)sin(--------) + (b %pi x  - 105)fresnelS(b x)
                                       2
     + 
                                    2     2
         7   3 7       3     3     b %pi x
       (b %pi x  - 35 b %pi x )cos(--------)
                                       2
  /
        8   4
     8 b %pi

Why the error says when FriCAS evaluated '((x)^(7))(fresnel_sin((b)(x)))'
when Fricas itself does not have this function?

Notice that there is no problem using default integrate algorithm in Sage:

sage: integrate(x^7*fresnels(b*x),x)
1/8*x^8*fresnel_sin(b*x) - 1/16*sqrt(1/2)*((105*I + 105)*(1/4)^(1/4)*pi*erf(sqrt(1/2*I*pi)*b*x) - (105*I - 105)*(1/4)^(1/4)*pi*erf(sqrt(-1/2*I*pi)*b*x) - 4*(sqrt(1/2)*pi^4*b^7*x^7 - 35*sqrt(1/2)*pi^2*b^3*x^3)*cos(1/2*pi*b^2*x^2) + 28*(sqrt(1/2)*pi^3*b^5*x^5 - 15*sqrt(1/2)*pi*b*x)*sin(1/2*pi*b^2*x^2))/(pi^5*b^8)

CC: @slel

Component: symbolics

Keywords: fricas, fresnel, integrate

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/26755

@nasser1 nasser1 added this to the sage-8.5 milestone Nov 24, 2018
@mantepse
Copy link
Collaborator

comment:1

I think that this was just fixed in #26746:

sage: from sympy import fresnelc, fresnels
sage: var('a b c d e m n x ')
sage: integrate(x^7*fresnels(b*x),x,algorithm="fricas")
1/8*((pi^3*b^7*x^7 - 35*pi*b^3*x^3)*cos(1/2*pi*b^2*x^2) + (pi^4*b^8*x^8 - 105)*fresnel_sin(b*x) - 7*(pi^2*b^5*x^5 - 15*b*x)*sin(1/2*pi*b^2*x^2))/(pi^4*b^8)

@mantepse
Copy link
Collaborator

Author: Martin Rubey

@nasser1
Copy link
Author

nasser1 commented Nov 28, 2018

comment:5

Thanks. This is confirmed fixed in

SageMath version 8.5.beta5, Release Date: 2018-11-25   
sage: from sympy import fresnelc, fresnels
sage: var('a b c d e m n x ')
sage: integrate(x^7*fresnels(b*x),x,algorithm="fricas")

1/8*((pi^3*b^7*x^7 - 35*pi*b^3*x^3)*cos(1/2*pi*b^2*x^2) + (pi^4*b^8*x^8 - 105)*fresnel_sin(b*x) - 7*(pi^2*b^5*x^5 - 15*b*x)*sin(1/2*pi*b^2*x^2))/(pi^4*b^8)
sage: 


@slel
Copy link
Member

slel commented Feb 15, 2019

Reviewer: Frédéric Chapoton

@slel
Copy link
Member

slel commented Feb 15, 2019

Changed keywords from fricas fresnel to fricas, fresnel, integrate

@slel
Copy link
Member

slel commented Feb 15, 2019

Changed author from Martin Rubey to none

@slel

This comment has been minimized.

@embray
Copy link
Contributor

embray commented Feb 26, 2019

comment:7

Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants