Re: [sage-support] Re: Trouble getting *collect* to work with derivatives.

2021-01-25 Thread Christian Seberino


>
> Secondly, what are you trying to collect? The D[0,0] terms or 
> f(xp, yp, zp, tp), x, 2) which are two different things? 


What is the difference between those 2?
 

> Given 
> what you are trying to do I guess it is the first one, in which 
> case you should have tried 
>
> sage: term = f(x,y,z,t).derivative(x,2).subs(x=xp,y=yp,z=zp,t=tp) 
>
>
Is this the same as derivative(f(xp(x, y, z, t), yp(x, y, z, t), zp(x, y, 
z, t), tp(x, y, z, t)) , x, 2)?

Thanks,

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/90dd8549-61b9-4f39-b20e-fb6875cd9a36n%40googlegroups.com.


Re: [sage-support] Re: Trouble getting *collect* to work with derivatives.

2021-01-24 Thread Christian Seberino
What are computed operators?  Are those the D[0, 0] things? How avoid
those? Is that same as second derivative of 1st variable?

On Sun, Jan 24, 2021, 11:33 AM Emmanuel Charpentier <
emanuel.charpent...@gmail.com> wrote:

> Probably because “the given second derivative” has a “computed operator”…
>
> BTW :
>
> var("x,y,z,t,v,c")
> f=function("f")
> xp=(t-v*x)/sqrt(1-v^2/c^2)
> yp=y
> zp=z
> tp=(t-v*x/c^2)/sqrt(1-v^2/c^2)
> foo=(sum(map(lambda u:derivative(f(xp,yp,zp,tp),u,2), (x, y, 
> z)))-derivative(f(xp,yp,zp,tp),t,2)/c^2).factor()
> view(foo.simplify_full())
>
> does partially what you mean…
> Le dimanche 24 janvier 2021 à 17:36:44 UTC+1, cseb...@gmail.com a écrit :
>
>> Emmanuel
>>
>> But my question is more simple than that. I just want to know why the
>> collect method was not able to collect all the terms with the given second
>> derivative.
>>
>> On Sun, Jan 24, 2021, 2:15 AM Emmanuel Charpentier <
>> emanuel.c...@gmail.com> wrote:
>>
>>> Sage has recently acquired a large set of tools relative to manifolds
>>> . A look at these tools and related
>>> tutorials/references may be in order…
>>>
>>> HTH,
>>> ​
>>> Le samedi 23 janvier 2021 à 23:17:26 UTC+1, cseb...@gmail.com a écrit :
>>>
 What you intend to do isn’t really clear… Could you try and clear your
> goals ?
>
 Emmanuel

 Thanks so much for your help.  I'm trying to show that the wave
 equation (https://en.wikipedia.org/wiki/Wave_equation)
 is invariant under a certain coordinate transformation called the
 Lorentz transformation (special relativity).

 I represent the function that obeys the wave equation in the primed
 coordinate system by f(xp, yp, zp, tp).

 I also represent the primed coordinates by the coordinates in the
 unprimed coordinate system.
 Therefore,   f(xp, yp, zp, tp) =  f(xp(x, y, z, t), yp(x, y, z, t),
 zp(x, y, z, t), tp(x, y, z, t)).

 I then find a bunch of derivates of f(xp(x, y, z, t), yp(x, y, z, t),
 zp(x, y, z, t), tp(x, y, z, t)) and try to collect terms.

 All the coordinates should be real numbers.

 Does that explain everything?




>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "sage-support" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/sage-support/TDseIA1M7vY/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> sage-support...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/sage-support/068e5ac0-1d78-453f-a465-bc84e1d1fc90n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-support/TDseIA1M7vY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/ee8a8ac7-0505-4b3d-bd57-f4d7f01aa3c6n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAG5-5iJxkz2oj9viMoaLa4AcbFe1QuCLGp1YCfY%3Dg7SkbexgBg%40mail.gmail.com.


Re: [sage-support] Re: Trouble getting *collect* to work with derivatives.

2021-01-24 Thread Christian Seberino
Emmanuel

But my question is more simple than that. I just want to know why the
collect method was not able to collect all the terms with the given second
derivative.

On Sun, Jan 24, 2021, 2:15 AM Emmanuel Charpentier <
emanuel.charpent...@gmail.com> wrote:

> Sage has recently acquired a large set of tools relative to manifolds
> . A look at these tools and related
> tutorials/references may be in order…
>
> HTH,
> ​
> Le samedi 23 janvier 2021 à 23:17:26 UTC+1, cseb...@gmail.com a écrit :
>
>> What you intend to do isn’t really clear… Could you try and clear your
>>> goals ?
>>>
>> Emmanuel
>>
>> Thanks so much for your help.  I'm trying to show that the wave equation (
>> https://en.wikipedia.org/wiki/Wave_equation)
>> is invariant under a certain coordinate transformation called the Lorentz
>> transformation (special relativity).
>>
>> I represent the function that obeys the wave equation in the primed
>> coordinate system by f(xp, yp, zp, tp).
>>
>> I also represent the primed coordinates by the coordinates in the
>> unprimed coordinate system.
>> Therefore,   f(xp, yp, zp, tp) =  f(xp(x, y, z, t), yp(x, y, z, t), zp(x,
>> y, z, t), tp(x, y, z, t)).
>>
>> I then find a bunch of derivates of f(xp(x, y, z, t), yp(x, y, z, t),
>> zp(x, y, z, t), tp(x, y, z, t)) and try to collect terms.
>>
>> All the coordinates should be real numbers.
>>
>> Does that explain everything?
>>
>>
>>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-support/TDseIA1M7vY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/068e5ac0-1d78-453f-a465-bc84e1d1fc90n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAG5-5iKn4APn1FRBfXoxeyzbcCDdLFyqssehxuNYQJ5f0yzi7w%40mail.gmail.com.


[sage-support] Re: Trouble getting *collect* to work with derivatives.

2021-01-23 Thread Christian Seberino

>
> What you intend to do isn’t really clear… Could you try and clear your 
> goals ?
>
Emmanuel  

Thanks so much for your help.  I'm trying to show that the wave equation 
(https://en.wikipedia.org/wiki/Wave_equation)
is invariant under a certain coordinate transformation called the Lorentz 
transformation (special relativity).

I represent the function that obeys the wave equation in the primed 
coordinate system by f(xp, yp, zp, tp).

I also represent the primed coordinates by the coordinates in the unprimed 
coordinate system.
Therefore,   f(xp, yp, zp, tp) =  f(xp(x, y, z, t), yp(x, y, z, t), zp(x, 
y, z, t), tp(x, y, z, t)).

I then find a bunch of derivates of f(xp(x, y, z, t), yp(x, y, z, t), zp(x, 
y, z, t), tp(x, y, z, t)) and try to collect terms.

All the coordinates should be real numbers.

Does that explain everything?


 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6f836001-5abf-409e-aa45-14953697cce0n%40googlegroups.com.


[sage-support] Trouble getting *collect* to work with derivatives.

2021-01-22 Thread Christian Seberino

I'm trying to collect all the terms in an expression with the same
second partial derivative but it doesn't seem to be working.
I can't figure out why.

Here is my code

# 

function("xp yp zp tp f")
var("x y z t v c")

xp = (x - v * t) / sqrt(1 - v^2 / c^2)
yp = y
zp = z
tp = (t - v * x / c^2) / sqrt(1 - v^2 / c^2)

e = derivative(f(xp, yp, zp, tp), x, 2) + derivative(f(xp, yp, zp, tp), y, 
2) + derivative(f(xp, yp, zp, tp), z, 2) - derivative(f(xp, yp, zp, tp), t, 
2) / c^2

e.collect(derivative(f(xp, yp, zp, tp), x, 2))

#  

Here is the output.  I added spaces at a subtraction to make it easy to see
there are TWO of those D[0, 0](f) terms (each at the beginning of the 
sections).

(D[0, 0](f)(-(t*v - x)/sqrt(-v^2/c^2 + 1), y, z, (t - 
v*x/c^2)/sqrt(-v^2/c^2 + 1))/sqrt(-v^2/c^2 + 1) - v*D[0, 3](f)(-(t*v - 
x)/sqrt(-v^2/c^2 + 1), y, z, (t - v*x/c^2)/sqrt(-v^2/c^2 + 
1))/(c^2*sqrt(-v^2/c^2 + 1)))/sqrt(-v^2/c^2 + 1) - v*(D[0, 3](f)(-(t*v - 
x)/sqrt(-v^2/c^2 + 1), y, z, (t - v*x/c^2)/sqrt(-v^2/c^2 + 
1))/sqrt(-v^2/c^2 + 1) - v*D[3, 3](f)(-(t*v - x)/sqrt(-v^2/c^2 + 1), y, z, 
(t - v*x/c^2)/sqrt(-v^2/c^2 + 1))/(c^2*sqrt(-v^2/c^2 + 
1)))/(c^2*sqrt(-v^2/c^2 + 1)) 

- 

((v*D[0, 0](f)(-(t*v - x)/sqrt(-v^2/c^2 + 1), y, z, (t - 
v*x/c^2)/sqrt(-v^2/c^2 + 1))/sqrt(-v^2/c^2 + 1) - D[0, 3](f)(-(t*v - 
x)/sqrt(-v^2/c^2 + 1), y, z, (t - v*x/c^2)/sqrt(-v^2/c^2 + 
1))/sqrt(-v^2/c^2 + 1))*v/sqrt(-v^2/c^2 + 1) - (v*D[0, 3](f)(-(t*v - 
x)/sqrt(-v^2/c^2 + 1), y, z, (t - v*x/c^2)/sqrt(-v^2/c^2 + 
1))/sqrt(-v^2/c^2 + 1) - D[3, 3](f)(-(t*v - x)/sqrt(-v^2/c^2 + 1), y, z, (t 
- v*x/c^2)/sqrt(-v^2/c^2 + 1))/sqrt(-v^2/c^2 + 1))/sqrt(-v^2/c^2 + 1))/c^2 
+ D[1, 1](f)(-(t*v - x)/sqrt(-v^2/c^2 + 1), y, z, (t - 
v*x/c^2)/sqrt(-v^2/c^2 + 1)) + D[2, 2](f)(-(t*v - x)/sqrt(-v^2/c^2 + 1), y, 
z, (t - v*x/c^2)/sqrt(-v^2/c^2 + 1)) 


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5c664d22-f09a-46f5-87b6-1d1f2ce39dc3n%40googlegroups.com.


[sage-support] Did something change to break Sage interactives using sagecell.sagemath.org recently?

2020-07-11 Thread Christian Seberino

I have some simple Sage interactives that used to work but I recently tried 
them and they don't anymore.
I tried creating other toy examples and they also don't work.

https://seberino.pythonanywhere.com/static/electric_force.html

Did something change recently like the URL should use for 
sagecell.sagemath.org?

Thanks,

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/20e89865-5d5c-46d8-98b6-486d8d50a642o%40googlegroups.com.


Re: [sage-support] Re: How solve simple log equation?

2017-07-16 Thread Christian Seberino
Dominique

THANK YOU!  Without or without declaring x your way works

This...

var("y C")
solve( log(y) == C + log(x) + log(y-1),x)
solve( x == y/(y*e^C - e^C), y)

Gives...

[y == x*e^C/(x*e^C - 1)]

What is amazing is that simply having y appear in 2 places makes it
unsolvable directly without solving for x first.
What if my equation did not have the option of solving for x first?  Is it
normal for "simple" nonlinear equations
to be unsolvable systematically?  I wouldn't be surprised if it wasn't
Sage's fault and there simply isn't
a foolproof systematic way to solve log equations but not sure.

cs

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.