Opened 8 years ago

Last modified 6 months ago

#12074 new enhancement

real nth root function

Reported by: burcin Owned by: burcin
Priority: minor Milestone: sage-wishlist
Component: symbolics Keywords: nth_root
Cc: kcrisman, karsten.naert@…, eviatarbach, slelievre Merged in:
Authors: Burcin Erocal Reviewers:
Report Upstream: N/A Work issues: needs tests and documentation
Branch: Commit:
Dependencies: Stopgaps:

Attachments (1)

trac_12074-nth_root.patch (2.6 KB) - added by burcin 8 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by burcin

  • Cc kcrisman added
  • Work issues set to needs tests and documentation

comment:2 follow-up: Changed 8 years ago by jdemeyer

Is there any chance this could be made into a function that we can do calculus with, like computing derivatives, integrals, solving equations... (I'm afraid the answer will be no though because we need maxima).

Changed 8 years ago by burcin

comment:3 in reply to: ↑ 2 Changed 8 years ago by burcin

Replying to jdemeyer:

Is there any chance this could be made into a function that we can do calculus with, like computing derivatives, integrals, solving equations... (I'm afraid the answer will be no though because we need maxima).

This is already a symbolic function, so it plays well with symbolics generally (as opposed to piecewise functions for instance):

sage: v = nth_root(x,3)
sage: v*sin(x) + x^2
x^2 + real_nth_root(x, 3)*sin(x)

I updated the patch to add custom exponentiation and derivative methods as well:

sage: v^2
real_nth_root(x, 3/2)
sage: v*v
real_nth_root(x, 3/2)
sage: v.diff(x)
1/3*real_nth_root(x, -3/2)

This all needs a lot of work of course.

For integration and solving equations we call out to maxima. One way to get sensible results from these calls would be to convert this function to a regular (base)^(exp) representation when passing it to maxima. I don't think there is any way to read it back from the maxima result though.

comment:4 Changed 8 years ago by jdemeyer

  • Cc karsten.naert@… added

comment:5 Changed 6 years ago by eviatarbach

  • Cc eviatarbach added

comment:6 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:7 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:8 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:9 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:10 Changed 6 months ago by slelievre

  • Cc slelievre added
  • Milestone changed from sage-6.4 to sage-wishlist
Note: See TracTickets for help on using tickets.