did you mean to integrate with respect to "x^2" ?

Well, x^2 doesn't occur in   f(x).  So let's rename x^2 as y.
What is the integral of f(x) with respect to y?

It is y*f(x).

substituting back x^2 for y,  you get x^2*f(x).

Or did you mean something else? Certainly Maxima expects "the variable
of integration" as
the second argument.  Anything else is asking for trouble.




On Aug 18, 3:51 am, Golam Mortuza Hossain <gmhoss...@gmail.com> wrote:
> Hi,
>
> While testing new integral SFunction class for Sage,
> I encountered this weird bug.
>
> ----------
> sage: f(x) = function('f',x)
>
> sage: f(x).integral(x)
> integrate(f(x), x)
>
> sage: f(x).integral(x^2)
> x^2*f(x)
> -----------
>
> It appears to be a Maxima bug
> ----------
> (%i10) integrate(f(x), x^2);
>                                      2
> (%o10)                              x  f(x)
> ----------
>
> However, even "integral" of calculus.py seems to do crazy thing as well.
> In line 566, it does
>
> elif not is_SymbolicVariable(v):
>         v = var(repr(v))
>
> Above imply
>
> --------
> sage: v = var(repr(x^2))
> sage: v
> x^2
> sage: v.diff(x)
> 0
> -------
>
> The next commented out line in calculus.py seems to be the right
> thing do here!!
>
> Cheers,
> Golam
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to