Ask Your Question
1

Change of programmation of implicit

asked 5 years ago

Cyrille gravatar image

updated 5 years ago

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 ?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
0

answered 5 years ago

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))
Preview: (hide)
link

Comments

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

Cyrille gravatar imageCyrille ( 5 years ago )

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 ( 5 years ago )
0

answered 5 years ago

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.

Preview: (hide)
link

Comments

When I typeset function? here is the answer

Object function not found.

Cyrille gravatar imageCyrille ( 5 years ago )

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 ( 5 years ago )

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: 5 years ago

Seen: 507 times

Last updated: Sep 22 '19