Ask Your Question
1

Change of programmation of implicit

asked 2019-09-22 03:31:09 -0600

Cyrille gravatar image

updated 2019-09-22 03:34:08 -0600

In the former question "Calculus with formal functions: substitution?", one can obtain implicit differentiation by the following code

var('f,x,y')
y = function('y',x)
f = function('f',x,y)
f.diff(x)

which gives

D1(x, y(x))*D0(x) +D0(x, y(x))

But I use the last version ofg SageMath and I have the following error

TypeError: function() takes exactly 1 positional argument (2 given)

Is there some new way to handle this code ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-09-22 03:42:51 -0600

rburing gravatar image

It seems that you want the following:

var('x')
y = function('y')(x)
f = function('f')(x,y)
f.diff(x)

Output:

D[1](f)(x, y(x))*diff(y(x), x) + D[0](f)(x, y(x))
edit flag offensive delete link more

Comments

On my computer this lead to : name 'var' is not defined

Cyrille gravatar imageCyrille ( 2019-09-22 05:41:38 -0600 )edit

Dear Emmanuel I Don't know why my computer refused to do the job all the day. And then all in a sudden it accepts to work correctly without any complete shutdown.

Cyrille gravatar imageCyrille ( 2019-09-22 14:59:33 -0600 )edit
0

answered 2019-09-22 04:00:43 -0600

Emmanuel Charpentier gravatar image

To amplify rbuning's answer, which is exact, you should try

function?

which should be illuminating...

Sage's online help is exceptionally useful, on par with R's, and should be used as a first recourse.

A very good primer on Sage is this book, which also exists in German, and which is the translation of a french book.

edit flag offensive delete link more

Comments

When I typeset function? here is the answer

Object function not found.

Cyrille gravatar imageCyrille ( 2019-09-22 05:40:26 -0600 )edit

Either you have a seriously hosed system or you don't stat it the right way...

Can you describe: - your system (OS, version) - your Sage installation (how did you install sage ?) - how you start Sage (Jupyter notebook ? terminal ? (old) Sage notebook ? other ?) - what you see on the screen ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-09-22 12:53:54 -0600 )edit

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: 2019-09-22 03:31:09 -0600

Seen: 27 times

Last updated: Sep 22