Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
0

How to read this code?

asked 12 years ago

yangzb gravatar image

updated 12 years ago

calc314 gravatar image

In sage, I performed the laplace transformation:

de=diff(y,t,2)-diff(y,x,2)==k*sin(pi*x);de.laplace(t,s)

and got such a code:

s^2L(y(x,t),t,s)-D[0](y)(x,t)2D[0,0]L(y(x,t),t,s)?sy(x,0)?D[0]L(y(x,t),t,s)D[0,0](y)(x,t)?D[1](y)(x,0)=sksin(?x)

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?
Thanks!

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 12 years ago

calc314 gravatar image

updated 12 years ago

Here is what I get.

var('y t s k')
y=function('y',x,t)
de=diff(y,t,2)-diff(y,x,2)==k*sin(pi*x)
de.laplace(t,s)

gives

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:

yt = D[1](y)(x, t)

yx = D[0](y)(x, t)

2yt2 = D[1, 1](y)(x, t)

2yx2 = D[0, 0](y)(x, t)

So, D[0](y)(0, x) is yt|t=0.

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

Preview: (hide)
link

Comments

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

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

calc314 gravatar imagecalc314 ( 12 years ago )

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

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

calc314 gravatar imagecalc314 ( 12 years ago )

I got it. Thanks!

yangzb gravatar imageyangzb ( 12 years ago )
2

answered 12 years ago

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)
D[0](f)(x)
sage: f.diff(x).diff(x)
D[0, 0](f)(x)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 12 years ago

Seen: 653 times

Last updated: Aug 19 '12