2
$\begingroup$

Suppose I have a long algebraic expression, and in there somewhere I have derivatives of a function V[x,y,z].

I want to set

D[V[x,y,z], {x,2}] + D[V[x,y,z], {y,2}] + D[V[x,y,z], {z,2}] 

to zero. How can I program this? I don't want to specify the function, I just want to set its Laplacian to zero.

$\endgroup$
6
  • $\begingroup$ You need to give an example. Context is important. You can set an expression to zero in number of ways, but it depends on context. You can use replace or use simplify with side relation or any other method. btw, you can just write Laplacian[V[x, y, z], {x, y, z}] no need to do it explicitly. Mathematica known the Laplacian. To set equation, do Laplacian[V[x, y, z], {x, y, z}]==0 $\endgroup$
    – Nasser
    Commented Aug 19, 2023 at 5:09
  • $\begingroup$ Thanks, A calculation gives an expression like this: (1/(V[x,y,z]^2))((V^(0,0,1))[x,y,z]^2-(V^(0,1,0))[x,y,z]^2+(V^(1,0,0))[x,y,z]^2 -V[x,y,z] ((V^(0,0,2))[x,y,z]+(V^(0,2,0))[x,y,z]+(V^(2,0,0))[x,y,z])) The first line is fine. The second line has the Laplacian. I want to teach mathematica to set the second line to zero. $\endgroup$ Commented Aug 19, 2023 at 5:34
  • $\begingroup$ Are you saying that I can simply try: Laplacian[V[x, y, z], {x, y, z}] -> 0 $\endgroup$ Commented Aug 19, 2023 at 5:37
  • 1
    $\begingroup$ I can't read what you have there as you did not use the InputForm. It will be better to edit your question and post the input you have, making sure it is in InputForm, and show what output you want after setting the Laplacian to zero. It depends on how complicated the input is, what the solution will be. It is no different that replacing sayin Sin[x] by zero in an expression. But it depends on the input looks like. Trying doing expr /.Laplacian[V[x, y, z], {x, y, z}]->0 and see if that works. $\endgroup$
    – Nasser
    Commented Aug 19, 2023 at 6:39
  • $\begingroup$ This is actually a quite interesting problem. Basically what you wants is that the Laplacian generates a differential ideal (in the sense of differential algebra) including all the relations ${\square}=0,\partial{\square}=0,...$, then calculate the quotient image of an expression. I have no idea how to achieve this. $\endgroup$
    – Lacia
    Commented Aug 19, 2023 at 16:43

1 Answer 1

1
$\begingroup$
$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global`*"]

expr = (1/V[x, y, z]^2) Derivative[0, 0, 1][V][x, y, 
     z]^2 - (Derivative[0, 1, 0][V][x, y, z]^2 + 
    Derivative[1, 0, 0][V][x, y, z]^2 - 
    V[x, y, z] (Derivative[0, 0, 2][V][x, y, z] + 
       Derivative[0, 2, 0][V][x, y, z] + 
       Derivative[2, 0, 0][V][x, y, z]))

enter image description here

Simplify the expression with the assumption that the Laplacian is zero

cons = Laplacian[V[x, y, z], {x, y, z}] == 0;

expr2 = Simplify[expr, cons]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks! This is helpful. Suppose I have not just the Laplacian in the expression, but say, x derivative of the Laplacian. How will Mathematica know to set the first derivative of the Laplacian to zero too? $\endgroup$ Commented Aug 19, 2023 at 9:57
  • $\begingroup$ cons = {Laplacian[V[x, y, z], {x, y, z}] == 0, D[Laplacian[V[x, y, z], {x, y, z}], x] == 0}; $\endgroup$
    – Bob Hanlon
    Commented Aug 19, 2023 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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