Skip to main content
1-Visitor
January 4, 2021
Question

Taylor series not working

  • January 4, 2021
  • 2 replies
  • 3315 views

Hi everyone,

Taylor's serial development doesn't want to work. Attached is the error displayed. Thanks in advance for helping me solve this problem.

Thank you.

2 replies

25-Diamond I
January 4, 2021

Its hard to debug a picture, so you sure should attach your worksheet.

Is this the only command you experience problems with or are the errors with other symbolic commands, too?

 

Only thing that I notice is that Prime should detect "sin" as being a function and should therefore display it in non-italic letters. Can it be that you redefined "sin" somewhere above by writing something like sin:=123 ? This would make sin a variable. But this should result in a meaningful error message (like "this must be a function").

 

Have you tried to close Prime, create a new fresh sheet and type the expression from scratch?

 

After all, here is what it should look like:

Werner_E_0-1609790063720.png

 

BouY1-VisitorAuthor
1-Visitor
January 5, 2021

Hello, Attached is the file. There is only the sine function. Not every function works with Taylor expansion.

23-Emerald I
January 5, 2021

Just as an exercise (since I'm using Prime Express and symbolics are premium) I tried to create a Taylor Series numerical evaluation function.  And, SURPRISE, it worked (at least a little.)  For whatever reason, you can only have the first five derivatives (a six term expansion.)

 

It works on sine function.  It does truly strange things to 1/x.

 

Attached Prime 4.0.

25-Diamond I
January 5, 2021

It works on sine function.  It does truly strange things to 1/x.

 


Not so strange if you consider the range of convergence and chose an appropriate zoom:

Werner_E_0-1609864626873.png

 

The numerical Prime limitation to just five derivatives is indeed strange:

Werner_E_0-1609864961703.png

But the Prime help at least is not hiding that limitation. Its states: "The derivative and prime operators do not compute derivatives of order greater than five. However, you can nest derivative operators within each other to compute higher order derivatives, with associated loss in accuracy for each successive order."

So there may be a workaround using successive nested derivative operators. Not sure if it could be done without programming in Express. I just tried and the derivative operator dos not accept a function like ceil(i/2) at the placeholder for the order of the derivative. The idea was to nest the ceil(i/2) derivative and the trunc(i/2) derivative to allow in a first step up to the tenth derivative.