Ask Your Question

A simple problem related to symbolic calculation

asked 2015-05-30 14:15:05 +0200

Nownuri1 gravatar image

updated 2015-05-30 14:40:17 +0200

rws gravatar image

Could anyone let me know how you can define a variable as some function of another variable without specific definition? For example, how can you define theta as some function of x and then differentiate the 'sin(theta)' by x?

The following is my code that doesn't work. I couldn't find how to fix it in reference manuals. Any help will be appreciated.

var('theta, y, f')

y=sin(theta) ; theta=f(x);


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-30 14:37:30 +0200

rws gravatar image

updated 2015-05-30 16:34:08 +0200

sage: theta = function('theta')(x)
sage: y = sin(theta)
sage: y.diff(x)

Dis the differential operator, see The online Sage docs are a bit behind the newest development version, so I cannot give you a link to Sage docs at the moment.

edit flag offensive delete link more


Thank you so much!

Nownuri1 gravatar imageNownuri1 ( 2015-05-30 14:49:58 +0200 )edit

But could you please tell me what the D[0] (theta) (x) means?

Nownuri1 gravatar imageNownuri1 ( 2015-05-30 14:56:55 +0200 )edit

I added to the answer. HTH.

rws gravatar imagerws ( 2015-05-30 16:34:46 +0200 )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


Asked: 2015-05-30 14:15:05 +0200

Seen: 280 times

Last updated: May 30 '15