Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Lets say I have the following PDE:

$$x^2 u_{xx} - u_{yy} + u_y = 0$$

And I have the following change of variables:

$$ s(x,y) = x e^y \, \, \, , \, \, t(x,y) = x e^{-y}$$

How can I use Mathematica to compute $u_{xx}, u_{yy},u_y$ on terms of $u_{ss},u_{tt}, u_{ts},u_t,u_s$ using the definitions and the chain rule?

share|improve this question
1  
If I understand well, closely related: 44904, possible duplicate: 9351 –  Kuba Jun 15 at 16:43

2 Answers 2

up vote 7 down vote accepted
expr = x^2 D[u[x, y], {x, 2}] - D[u[x, y], {y, 2}] + D[u[x, y], y]

enter image description here

$Assumptions = {s > 0, t > 0}
expr /. u -> (u[# Exp[#2], # Exp[-#2]] &) /. {x -> Sqrt[s t],
                                              y -> Log[Sqrt[s/t]]} // Simplify

enter image description here


Second set of replacement rules is from:

Eliminate[s == x Exp[y] && t == x Exp[-y], x]
Eliminate[s == x Exp[y] && t == x Exp[-y], y]
E^(2 y) t == s
s t == x^2 && (s t)/x == x

I've forced $Assumptions so things like Sqrt[s^2] are reduced to s but keep them in mind. Sometimes it may be important.

share|improve this answer

Just in case someone else need it (for example, quite possibly myself in the future), this is how I've done it

(Note: In the answer a different change of variables has been used)

s[x_, y_] := Log[x] + y
t[x_, y_] := Log[x] - y
Factor@D[u[s[x, y], t[x, y]], {x, 2}]
FullSimplify@D[u[s[x, y], t[x, y]], y]
Factor@D[u[s[x, y], t[x, y]], {y, 2}]
x^2 D[u[s[x, y], t[x, y]], {x, 2}] - 
  Factor@D[u[s[x, y], t[x, y]], {y, 2}] + 
  FullSimplify@D[u[s[x, y], t[x, y]], y] // FullSimplify

Which outputs the following:

enter image description here

Reading the output is quite anoying, but it was good enough for what I needed. (I'm sure it can be improved easily)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.