0
$\begingroup$

I would like Mathematica to write down the Laplace-Beltrami operator in $R^N$ $$ \Delta f = \frac{\partial^2 f}{\partial r^2} + \frac{N-1}{r} \frac{\partial f}{\partial r} + \frac{1}{r^2} \delta f, $$ $$ \delta = \sum\limits_{j = 1}^{N - 1} {\frac{1} {{q_j \left( {\sin \theta _j } \right)^{N - j - 1} }}\frac{\partial } {{\partial \theta _j }}\left( {\left( {\sin \theta _j } \right)^{N - j - 1} \frac{\partial } {{\partial \theta _j }}} \right)} , $$ $$ \begin{array}{*{20}c} {q_1 = 1,} & {q_j = \left( {\sin \theta _1 \sin \theta _2 \cdots \sin \theta _{j - 1} } \right)^2 ,} & {j = 2, \ldots ,N - 1} \\ \end{array} $$ as a function of $N$, i.e. I want to specify $N$ and compute the symbolic sum of $\delta$. I tried with

q[1] := 1

q[j_] := (Product[Sin[Subscript[θ, i]], {i, 1, j - 1}])^2

δ[N_] := 
 Sum[1/(q[j] (Sin[Subscript[θ, j]])^(N - j - 1)) \!\(
\*SubscriptBox[\(∂\), 
SubscriptBox[\(θ\), \(j\)]]\((
\*SuperscriptBox[\((Sin[
\*SubscriptBox[\(θ\), \(j\)]])\), \(N - j - 1\)]\ 
\*SubscriptBox[\(∂\), 
SubscriptBox[\(θ\), \(j\)]])\)\), {j, 1, N - 1} ]

but it does not work:

Syntax::sntxi: Incomplete expression; more input is needed.

Anyone has any idea?

Thanks

$\endgroup$
5
  • 2
    $\begingroup$ Please do not post code as LaTeX. Post it in a way that it can be copied and pasted back to Mathematica. $\endgroup$
    – Szabolcs
    Commented Aug 25, 2016 at 15:14
  • $\begingroup$ Note that you cannot use N, it's a built-in. $\endgroup$ Commented Aug 25, 2016 at 15:21
  • 1
    $\begingroup$ Also, see this, and this. $\endgroup$
    – QuantumDot
    Commented Aug 25, 2016 at 15:23
  • 1
    $\begingroup$ I will recommend checking prior MSE posts related to this topic. Among other things, Product is not going to be useful because it assumes commuting factors. $\endgroup$ Commented Aug 25, 2016 at 15:42
  • $\begingroup$ Welcome! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – user9660
    Commented Aug 25, 2016 at 18:04

1 Answer 1

1
$\begingroup$

The partial derivatives are causing the problems in your above code. If you realy just want to write it down here is a version that just prints the definition:

\[Delta][N_] :=
Sum[Row[{1/(q[j] Sin[Subscript[\[Theta], j]]^(N - j - 1)), (
"\[PartialD]")/Subscript["\[PartialD]\[Theta]", j], "(", 
Sin[Subscript[\[Theta], j]]^(N - j - 1), ("\[PartialD]")/
Subscript["\[PartialD]\[Theta]", j], ")"}], {j, 1, N - 1} ]

This will create a sum of terms which can not be manipulated algebraically by mathematica since they are row expressions.

$\endgroup$
1
  • $\begingroup$ Thank you Steil, that was what I was looking for. $\endgroup$ Commented Aug 25, 2016 at 19:37

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.