On 17 Set, 23:03, Yann <[email protected]> wrote:
> If I try this, here is what I get:
>
> sage: var('a')
> a
> sage: integral(cos(2*x)/(x^2+a^2),x,-Infinity,+Infinity)
> ERROR: An unexpected error occurred while tokenizing input
> ...
> TypeError: Computation failed since Maxima requested additional
> constraints (try the command 'assume(a>0)' before integral or limit
> evaluation, for example):
> Is a positive, negative, or zero?
>
> Ok, let's do this
>
> sage: assume(a>0)
> sage: integral(cos(2*x)/(x^2+a^2),x,-Infinity,+Infinity)
> pi*e^(-2*a)/a
>
> Is it what you expect?
Yes, it is!
But I don't declare also 'x' as variable?
I digited:
x,a=var('x,a')
Is it not correct?
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org