[sage-support] Re: sagenb /sage -n=jupyter

2016-01-19 Thread HG
Thanks... I am confused ?
I tried your jupyter/ipython example in sage -n=ipython (version 7 rc1 ) 
and it does work !
I use %display latex in sage -n=ipython to have latex displayed.
Sorry for cuting the example I didn't even notice it. 
Best
Henri

Le lundi 18 janvier 2016 17:40:26 UTC+1, HG a écrit :
>
> Hi,
> I can't get no maplotlib graphic inline , is it possible to do it ?
> %display latex
> %matplotlib inline
> import matplotlib.pyplot as plt
> import numpy as np
> x=np.linspace(-5,5,100)
> plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
> plt.ylabel('fonction sinus')
> plt.xlabel("l'axe des abcisse
> Any help
> Regards
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Getting a Symbolic version of a Sum

2016-01-19 Thread Nils Bruin

On Monday, January 18, 2016 at 6:35:59 PM UTC-8, saad khalid wrote:
>
> Hello everyone:
>
> I'm trying to compare some functionality in Sage with that of Mathematica. 
> For my assignment, I have to take this series:
>
> sum((-1)^n*((x)^(2*n+1))/factorial(2*n+1),n,0,oo)
>
>
> And put it into a mathematical software to see what function it is 
> equivalent to. In this case, this series is supposed to be equivalent to 
> the sine function. Indeed, when I put the following code in Mathematica, it 
> says that it is the Sine function:
> Sum((-1)^n*((x)^(2*n+1))/((2*n+1)!),{n,0,Infinity})
>
> I was hoping that there would be something similar to this in Sage. I'm 
> trying to symbolically use the sum function with the following code:
>
> x = var("x")
> n = var("n")
> k = var("k")
> show(sum(((-1)^n)*((x)^(2*n+1))/factorial(2*n+1),n,0,oo))
>
> What it outputs is not the sine function. Instead, it says that it is 
> equivalent to:
>
> 1/2*sqrt(2)*sqrt(pi)*sqrt(x)*bessel_J(1/2, x)
>
>
> I don't know why exactly it says this but I was wondering if there was any 
> way for Sage to do what Mathematica is doing here, in recognizing the 
> popular series and outputting that when I try to symbolically evaluate this 
> sum.
>
>
As Dima mentions, the relevant functionality is coming from Maxima in this 
case. Maxima does have a flag you can set to let it try to expand bessel 
functions into elementary functions, see 
http://maxima.sourceforge.net/docs/manual/maxima_15.html#SEC80
 It's not directly exposed in sage, but with some obscure code you can 
activate it:

sage: maxima_calculus("besselexpand:true")
true
sage: sum(((-1)^n)*((x)^(2*n+1))/factorial(2*n+1),n,0,oo)
sin(x)
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: sagenb /sage -n=jupyter

2016-01-19 Thread HG
I forget... To improve  my english : what "arse" mean  ? is it "behind" ? 
lol 
And sorry again, I tried it in sagenb !
But now I am convinced it wouldn't work !


Le lundi 18 janvier 2016 17:40:26 UTC+1, HG a écrit :
>
> Hi,
> I can't get no maplotlib graphic inline , is it possible to do it ?
> %display latex
> %matplotlib inline
> import matplotlib.pyplot as plt
> import numpy as np
> x=np.linspace(-5,5,100)
> plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
> plt.ylabel('fonction sinus')
> plt.xlabel("l'axe des abcisse
> Any help
> Regards
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: sagenb /sage -n=jupyter

2016-01-19 Thread HG
It's %display latex which makes matplotlib inline not working 


Le lundi 18 janvier 2016 17:40:26 UTC+1, HG a écrit :
>
> Hi,
> I can't get no maplotlib graphic inline , is it possible to do it ?
> %display latex
> %matplotlib inline
> import matplotlib.pyplot as plt
> import numpy as np
> x=np.linspace(-5,5,100)
> plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
> plt.ylabel('fonction sinus')
> plt.xlabel("l'axe des abcisse
> Any help
> Regards
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Getting a Symbolic version of a Sum

2016-01-19 Thread Dima Pasechnik


On Tuesday, 19 January 2016 17:22:52 UTC, kcrisman wrote:
>
>
>> As Dima mentions, the relevant functionality is coming from Maxima in 
>> this case. Maxima does have a flag you can set to let it try to expand 
>> bessel functions into elementary functions, see 
>> http://maxima.sourceforge.net/docs/manual/maxima_15.html#SEC80
>>  It's not directly exposed in sage, but with some obscure code you can 
>> activate it:
>>
>> sage: maxima_calculus("besselexpand:true")
>> true
>> sage: sum(((-1)^n)*((x)^(2*n+1))/factorial(2*n+1),n,0,oo)
>> sin(x)
>>  
>>
>
> Thanks, Nils.  As usual, the question becomes whether this should 
> "automagically" happen in Sage for certain simplifications...
>

perhaps a part of simplify_full() ?
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] sagenb /sage -n=jupyter

2016-01-19 Thread William Stein
On Tuesday, January 19, 2016, HG  wrote:

> I forget... To improve  my english : what "arse" mean  ? is it "behind" ?
> lol
>

Yes



>
> And sorry again, I tried it in sagenb !
> But now I am convinced it wouldn't work !
>
>
> Le lundi 18 janvier 2016 17:40:26 UTC+1, HG a écrit :
>>
>> Hi,
>> I can't get no maplotlib graphic inline , is it possible to do it ?
>> %display latex
>> %matplotlib inline
>> import matplotlib.pyplot as plt
>> import numpy as np
>> x=np.linspace(-5,5,100)
>> plt.plot(x,np.sin(x))  # on utilise la fonction sinus de Numpy
>> plt.ylabel('fonction sinus')
>> plt.xlabel("l'axe des abcisse
>> Any help
>> Regards
>>
>>



> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to sage-support@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Sent from my massive iPhone 6 plus.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Getting a Symbolic version of a Sum

2016-01-19 Thread kcrisman

>
>
> As Dima mentions, the relevant functionality is coming from Maxima in this 
> case. Maxima does have a flag you can set to let it try to expand bessel 
> functions into elementary functions, see 
> http://maxima.sourceforge.net/docs/manual/maxima_15.html#SEC80
>  It's not directly exposed in sage, but with some obscure code you can 
> activate it:
>
> sage: maxima_calculus("besselexpand:true")
> true
> sage: sum(((-1)^n)*((x)^(2*n+1))/factorial(2*n+1),n,0,oo)
> sin(x)
>  
>

Thanks, Nils.  As usual, the question becomes whether this should 
"automagically" happen in Sage for certain simplifications...

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.