Processing math: 20%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

partial derivatives

I have the function f(x,y,y)=1+y(x)2 from which I want to calculate fy as well as fy and ddx(fy).

I tried using the SymbolicRing of Sagemath with

 x = SR.var('x')
 y = function('y')
 f = sqrt(1+y(x).diff(x,1)^2)

which only allows me to calculate dfdx. So I tried with the following sample

 x,y = SR.var('x,y')
 y = function('y')(x)
 y1 = y.diff(x,1)
 f(x,y,y1) = sqrt(1+y1^2)
 fy1 = f.diff(y1)
 fy = f.diff(y)
 fxy1 = fy1.diff(x)

which works for calculating fy and fy, but not for ddx(fy). Because fxy1 returns 0 when it should return y.

I'd really appreciate any idea. Thanks in advance!

partial derivatives

I have the function f(x,y,y')= \sqrt{1+y'(x)^2} from which I want to calculate \frac{\partial f}{\partial y} as well as \frac{\partial f}{\partial y'} and \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right).

I tried using the SymbolicRing of Sagemath with

 x = SR.var('x')
 y = function('y')
 f = sqrt(1+y(x).diff(x,1)^2)

which only allows me to calculate \frac{df}{dx}. So I tried with the following sample

 x,y = SR.var('x,y')
 y = function('y')(x)
 y1 = y.diff(x,1)
 f(x,y,y1) = sqrt(1+y1^2)
 fy1 = f.diff(y1)
 fy = f.diff(y)
 fxy1 dxfy1 = fy1.diff(x)

which works for calculating \frac{\partial f}{\partial y} and \frac{\partial f}{\partial y'}, but not for \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right). Because fxy1 dxfy1 which stands for \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right) returns 0 when it should return \frac{y''}{\sqrt{1+y'(x)^2}^{3/2}}.

I'd really appreciate any idea. Thanks in advance!

partial derivatives

I have the function f(x,y,y')= \sqrt{1+y'(x)^2} from which I want to calculate \frac{\partial f}{\partial y} as well as \frac{\partial f}{\partial y'} and \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right).

I tried using the SymbolicRing of Sagemath with

 x = SR.var('x')
 y = function('y')
 f = sqrt(1+y(x).diff(x,1)^2)

which only allows me to calculate \frac{df}{dx}. So I tried with the following sample

 x,y = SR.var('x,y')
 y = function('y')(x)
 y1 = y.diff(x,1)
 f(x,y,y1) = sqrt(1+y1^2)
 fy1 = f.diff(y1)
 fy = f.diff(y)
 dxfy1 = fy1.diff(x)

which works for calculating \frac{\partial f}{\partial y} and \frac{\partial f}{\partial y'}, but not for \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right). Because dxfy1 which stands for \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right) returns 0 when it should return \frac{y''}{\sqrt{1+y'(x)^2}^{3/2}}.

Another unseccesful try would be

x,y = SR.var('x,y')
y = function('y')(x)
y1 = y.diff(x,1)
f(x,y,y1) = sqrt(1+y.diff(x)^2)
fy1(x,y,y1) = f.diff(y1); fy1
fy(x,y,y1) = f.diff(y); fy
fy1.diff(x)

I'd really appreciate any idea. Thanks in advance!

partial derivatives

I have the function f(x,y,y')= \sqrt{1+y'(x)^2} from which I want to calculate \frac{\partial f}{\partial y} as well as \frac{\partial f}{\partial y'} and \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right).

I tried using the SymbolicRing of Sagemath with

 x = SR.var('x')
 y = function('y')
 f = sqrt(1+y(x).diff(x,1)^2)

which only allows me to calculate \frac{df}{dx}. So I tried with the following sample

 x,y = SR.var('x,y')
 y = function('y')(x)
 y1 = y.diff(x,1)
 f(x,y,y1) = sqrt(1+y1^2)
 fy1 = f.diff(y1)
 fy = f.diff(y)
 dxfy1 = fy1.diff(x)

which works for calculating \frac{\partial f}{\partial y} and \frac{\partial f}{\partial y'}, but not for \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right). Because dxfy1 which stands for \frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right) returns 0 when it should return \frac{y''}{\sqrt{1+y'(x)^2}^{3/2}}.

Another unseccesful try would be

x,y = SR.var('x,y')
y = function('y')(x)
y1 = y.diff(x,1)
y1=function('y1')(x)
f(x,y,y1) = sqrt(1+y.diff(x)^2)
fy1(x,y,y1) = f.diff(y1); fy1
fy(x,y,y1) = f.diff(y); fy
fy1.diff(x)

I'd really appreciate any idea. Thanks in advance!