Ask Your Question
1

Taylor expansion twice for a general function cause problem?

asked 2011-12-16 15:13:28 +0100

updated 2011-12-16 16:27:26 +0100

kcrisman gravatar image

Hi,

I met a problem when expanding a general function twice:

y = var('y')
f = function('f',var('x'))
g = f(x=var('eps')*y)
h = taylor(g, eps, 0, 1)
taylor(h, eps, 0, 1)

The last expression ends up with an error: NotImplementedError: arguments must be distinct variables

Is it a bug or I got anything wrong? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-12-23 20:09:36 +0100

gabriel gravatar image

Hello, I'm new to Sage and running into the same problem as you. I think this error happens when the object that you want to Taylor expand has a derivative that is evaluated at a specified point:

x = var('x')
u = function('u', x)
v(x) = u.diff(x)
taylor(u(x = 0), x, 0, 2) #works
taylor(v(x), x, 0, 2) #works
taylor(v(x = 0), x, 0, 2) #doesn't work

v(0) = D[0](u)(0) seems to be the problem, just like, in your case, there is a D[0](f)(0) in the Taylor expansion of g

So my guess is that issue resides in how derivatives evaluated at a fixed point are passed to Maxima..

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-12-16 15:13:28 +0100

Seen: 435 times

Last updated: Dec 23 '11