sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.22k stars 424 forks source link

Taylor series should raise an error if derivative not defined. #28390

Open 99444c9b-4667-4341-abf6-78bb4dfc7950 opened 4 years ago

99444c9b-4667-4341-abf6-78bb4dfc7950 commented 4 years ago

I think an error should be raised in the following example:

sage: f(x) = x**(1/3); f
x |--> x^(1/3)
sage: f.taylor(x,0,3)
x |--> x^(1/3)

Component: calculus

Keywords: taylor series polynomial

Issue created by migration from https://trac.sagemath.org/ticket/28390

kcrisman commented 4 years ago
comment:1

I'm not familiar with this notation for Taylor polynomials (which is surprising) but anyway to make it clear:

f.taylor(x,0,3)
x |--> x^(1/3)

For what it's worth, f.series(x,3) gives an error.

99444c9b-4667-4341-abf6-78bb4dfc7950 commented 4 years ago

Description changed:

--- 
+++ 
@@ -3,7 +3,7 @@
 ```python
 sage: f(x) = x**(1/3); f
 x |--> x^(1/3)
-sage: f(x, 0, 3)
-x^(1/3)
+sage: f.taylor(x,0,3)
+x |--> x^(1/3)
99444c9b-4667-4341-abf6-78bb4dfc7950 commented 4 years ago
comment:2

Replying to @kcrisman:

I'm not familiar with this notation for Taylor polynomials (which is surprising) but anyway to make it clear:

f.taylor(x,0,3)
x |--> x^(1/3)

For what it's worth, f.series(x,3) gives an error.

I have no idea where I got my made up notation for Taylor polynomials from. You're totally right. Fixed! Thanks!

embray commented 4 years ago
comment:3

Ticket retargeted after milestone closed

mkoeppe commented 4 years ago
comment:4

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

mkoeppe commented 3 years ago
comment:6

Moving to 9.4, as 9.3 has been released.