[sage-support] Re: integral of exp(-x^2)*cos(x) from -pi to pi is complex?

2011-10-23 Thread achrzesz


On Oct 8, 10:05 am, achrzesz achrz...@wp.pl wrote:
 The exact integral

 1/2*(erf(pi - 1/2*I) + erf(pi + 1/2*I))*sqrt(pi)*e^(-1/4)

 contains *real* expression

 (erf(pi - 1/2*I) + erf(pi + 1/2*I))

 but maxima/sage can't check that it is real

 In WolframAlpha one can check that

 Im[Erf[Pi-1/2*I]+Erf[Pi+1/2*I]]

 iz zero

 Andrzej Chrzeszczyk

Fortunately I was wrong:

sage: w=integrate(exp(-x^2)*cos(x),(x,-pi,pi))/pi
sage: w.imag().full_simplify()
0

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] How to set 'location' in Normal distribution?

2011-10-23 Thread Jose Guzman

Hi everybody,

I am making a revision of ticket #11572 and wanted to become familiar 
with the way that Sage handle probability distributions . I realized 
that the normal distribution is implemented as follows in Sage:


sage: T=RealDistribution('gaussian',sigma=20)

Is there any reason why this class does not include the mean as a 
parameter for the gaussian distribution?


Are we supposed to use scipy.stats.norm instead?

Thanks in advance

Jose

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] finding the closed form for a linear second order recurrence sequence

2011-10-23 Thread Avril Coghlan
Dear all,

I am new to SAGE (since today) but am excited about learning how to use it!

I'm wondering is it possible to use SAGE to find the close form for a linear
second order recurrence sequence?
For example, can SAGE find a closed form for an equation such as:
 u_{n+2} = 2 * u_{n+1} + 8 * u_{n}, where we know u_{0} = 2 and u_{1} = 7  ?

I will be very grateful for any help, or if you can point me towards the
right documentation page to look at.

Kind Regards,
Avril

Avril Coghlan
Cork, Ireland

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] finding the closed form for a linear second order recurrence sequence

2011-10-23 Thread David Joyner
On Sun, Oct 23, 2011 at 4:51 PM, Avril Coghlan
avril.cogh...@googlemail.com wrote:
 Dear all,

 I am new to SAGE (since today) but am excited about learning how to use it!

 I'm wondering is it possible to use SAGE to find the close form for a linear
 second order recurrence sequence?
 For example, can SAGE find a closed form for an equation such as:
  u_{n+2} = 2 * u_{n+1} + 8 * u_{n}, where we know u_{0} = 2 and u_{1} = 7  ?

 I will be very grateful for any help, or if you can point me towards the
 right documentation page to look at.


Your question might be addressed in this sage-support thread:
http://www.mail-archive.com/sage-support@googlegroups.com/msg17045.html


 Kind Regards,
 Avril

 Avril Coghlan
 Cork, Ireland



 --
 To post to this group, send email to sage-support@googlegroups.com
 To unsubscribe from this group, send email to
 sage-support+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-support
 URL: http://www.sagemath.org


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Graphics Array and one function with different constants.

2011-10-23 Thread Eric Kangas
Hi,

I have one function that I need to plot in an array with different
values for two constants. I would like to only have to repeat the
function once, and go off of a string of different variables to
produce this array. Is that even possible in Sage? Or am I stuck with
repeating the function over and over again for the graphics array?

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: finding the closed form for a linear second order recurrence sequence

2011-10-23 Thread Simon King
Hi David, hi Avril,

On 23 Okt., 23:18, David Joyner wdjoy...@gmail.com wrote:
 On Sun, Oct 23, 2011 at 4:51 PM, Avril Coghlan

 avril.cogh...@googlemail.com wrote:
  Dear all,

  I am new to SAGE (since today) but am excited about learning how to use it!

  I'm wondering is it possible to use SAGE to find the close form for a linear
  second order recurrence sequence?
  For example, can SAGE find a closed form for an equation such as:
   u_{n+2} = 2 * u_{n+1} + 8 * u_{n}, where we know u_{0} = 2 and u_{1} = 7  ?

  I will be very grateful for any help, or if you can point me towards the
  right documentation page to look at.

 Your question might be addressed in this sage-support 
 thread:http://www.mail-archive.com/sage-support@googlegroups.com/msg17045.html

Probably the thread is answering Avril's question.

But the last post in the thread is Nathann saying:

Should we create a ticket for this ? I'd have done it if not for my
doubt on the section I should pick for this... :-)


Is there a ticket?

Cheers,
Simon

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Graphics Array and one function with different constants.

2011-10-23 Thread achrzesz


On Oct 23, 11:33 pm, Eric Kangas eric.c.kan...@gmail.com wrote:
 Hi,

 I have one function that I need to plot in an array with different
 values for two constants. I would like to only have to repeat the
 function once, and go off of a string of different variables to
 produce this array. Is that even possible in Sage? Or am I stuck with
 repeating the function over and over again for the graphics array?

For example:

sage: graphics_array([[plot(sin(k*x/m),(x,0,pi)) for k in [1,2]] for m
in [1,2]]).show(frame=True,axes=False)

A Ch

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org