Updates:
        Labels: ness987 NeedsReview

Comment #16 on issue 1304 by ness...@googlemail.com: Integrate sqrt(x**2 + y**2) fails
http://code.google.com/p/sympy/issues/detail?id=1304

This works in gsoc-3 (https://github.com/sympy/sympy/pull/543):

In [18]: integrate(1/(x**2+y**2)**S('3/2'), x)
Out[18]:
        1
─────────────────
         ⎽⎽⎽⎽⎽⎽⎽⎽
        ╱      2
 2     ╱      y
y ⋅   ╱   1 + ──
     ╱         2
   ╲╱         x

In [19]: _.diff(x)
Out[19]:
      1
──────────────
           3/2
   ⎛     2⎞
 3 ⎜    y ⎟
x ⋅⎜1 + ──⎟
   ⎜     2⎟
   ⎝    x ⎠

The other integrals mentioned above can also be done, but are messier:

In [25]: integrate((x**2+y**2)**S('1/2'), x)
Out[25]:
                                         2      ⎛x⎞
         3                              y ⋅asinh⎜─⎟
        x                  x⋅y                  ⎝y⎠
────────────────── + ──────────────── + ───────────
          ⎽⎽⎽⎽⎽⎽⎽⎽           ⎽⎽⎽⎽⎽⎽⎽⎽        2
         ╱  2               ╱  2
        ╱  x               ╱  x
2⋅y⋅   ╱   ── + 1    2⋅   ╱   ── + 1
      ╱     2            ╱     2
    ╲╱     y           ╲╱     y

In [26]: integrate((x**2-y**2)**S('1/2'), x)
Out[26]:
⎧                                            2      ⎛x⎞
⎪            3                              y ⋅acosh⎜─⎟              │ 2│
⎪           x                  x⋅y                  ⎝y⎠              │x │
⎪   ────────────────── - ──────────────── - ───────────      for 1 < │──│
⎪             ⎽⎽⎽⎽⎽⎽⎽⎽           ⎽⎽⎽⎽⎽⎽⎽⎽        2                   │ 2│
⎪            ╱  2               ╱  2                                 │y │
⎪           ╱  x               ╱  x
⎪   2⋅y⋅   ╱   ── - 1    2⋅   ╱   ── - 1
⎪         ╱     2            ╱     2
⎪       ╲╱     y           ╲╱     y
⎨
⎪                                                 2     ⎛x⎞
⎪             3                                ⅈ⋅y ⋅asin⎜─⎟
⎪          ⅈ⋅x                  ⅈ⋅x⋅y                   ⎝y⎠
⎪- ──────────────────── + ────────────────── + ────────────   otherwise
⎪            ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽           ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽        2
⎪           ╱    2               ╱    2
⎪          ╱    x               ╱    x
⎪  2⋅y⋅   ╱   - ── + 1    2⋅   ╱   - ── + 1
⎪        ╱       2            ╱       2
⎩      ╲╱       y           ╲╱       y



--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to