Ask Your Question

How to read this code?

asked 2012-08-16 15:29:28 -0500

yangzb gravatar image

updated 2012-08-16 16:11:32 -0500

calc314 gravatar image

In sage, I performed the laplace transformation:


and got such a code:


Can someone tells me what D[0](y)(x,t)2D[0,0]L(y(x,t),t,s) and D[0]L(y(x,t),t,s)D[0,0](y)(x,t) mean?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-08-16 16:18:44 -0500

calc314 gravatar image

updated 2012-08-19 01:57:21 -0500

Here is what I get.

var('y t s k')


s^2*laplace(y(x, t), t, s) - D[0](y)(x, t)^2*D[0, 0](laplace)(y(x, t), t, s) - s*y(x, 0) - D[0](laplace)(y(x, t), t, s)*D[0, 0](y)(x, t) - D[1](y)(x, 0) == k*sin(pi*x)/s

Within this expression, the meanings are:

$\frac{\partial y}{\partial t}$ = D[1](y)(x, t)

$\frac{\partial y}{\partial x}$ = D[0](y)(x, t)

$\frac{\partial^2 y}{\partial t^2}$ = D[1, 1](y)(x, t)

$\frac{\partial^2 y}{\partial x^2}$ = D[0, 0](y)(x, t)

So, D[0](y)(0, x) is $\frac{\partial y}{\partial t}|_{t=0}$.

You can check the first one above by doing diff(y,t).

edit flag offensive delete link more


But,shouldn't it be :s^2*L(y(t,x),t,s)-s*y(0,x)-D[0](y)(0,x)-D[1,1]L(y(t,x),t,s). on the left side?

yangzb gravatar imageyangzb ( 2012-08-17 20:24:47 -0500 )edit

If you scroll over to the right, I think it's all there.

calc314 gravatar imagecalc314 ( 2012-08-18 01:43:21 -0500 )edit

I think they are different between -D[0](Laplace)(y(t,x),t,s)*D[1,1](y)(t,x)-D[0,0](laplace)(y(t,x),t,s)*D[1](y)(t,x)^2 and -D[1,1]L(y(t,x),t,s).

yangzb gravatar imageyangzb ( 2012-08-18 19:53:54 -0500 )edit

I changed my answer above to so that we have y(x,t) like your question, rather than y(t,x).

calc314 gravatar imagecalc314 ( 2012-08-19 01:58:21 -0500 )edit

I got it. Thanks!

yangzb gravatar imageyangzb ( 2012-08-19 02:59:47 -0500 )edit

answered 2012-08-16 16:16:56 -0500

benjaminfjones gravatar image

What you're seeing is the displayed notation for symbolic partial derivatives. D[0] means "apply the derivative operator with respect to variable number 0" and D[0,0] represents two successive derivatives with respect to the variable. Observe:

sage: f = function('f', x)
sage: f.diff(x)
sage: f.diff(x).diff(x)
D[0, 0](f)(x)
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


Asked: 2012-08-16 15:29:28 -0500

Seen: 151 times

Last updated: Aug 19 '12