# Laplacian along line [closed]

I am looking for a command that will calculate the Laplacian of a function defined on a line.

I have a definition of the line, $r(\theta)$

I want to calculate

$$\frac{1}{r}\frac{d}{dr}(r\frac{df}{dr}) + \frac{1}{r^2}\frac{d^2f}{d\theta^2}$$

When evaluating this derivative, it should change out r for theta to give a derivative which depends only on theta.

Laplacian[f[r, θ], {r, θ}, "Polar"] /. r -> 1 + Cos[2 θ] // Expand


This is what it prints out:

$$\frac{f^{(0,2)}(\cos (2 \theta )+1,\theta )}{(\cos (2 \theta )+1)^2}+\frac{f^{(1,0)}(\cos (2 \theta )+1,\theta )}{\cos (2 \theta )+1}+f^{(2,0)}(\cos (2 \theta )+1,\theta )$$

As you can see, the $f^{(2,0)}$ and $f^{(1,0)}$ are implicit derivatives of r, and the transformation using my equation of the line has not been carried out for differentiation.

• Please don't type equations and outputs using $\TeX$. It is better to have a mathematica-format code that anyone can copy and paste right away. – JungHwan Min Sep 1 '16 at 23:09
• The only input line I used was in mathematica syntax. I can't figure out how to get the output to copy and paste as a mathematica command. – Tony Ruth Sep 1 '16 at 23:16
• You could type // InputForm at the end of your code and paste the output. – JungHwan Min Sep 1 '16 at 23:21
• Your definition of the Laplacian is mathematically not properly adapted to the question you seem to be asking. On a line, r is a function of $\theta$ whereas your Laplacian treats $r,\theta$ as independent variables. Therefore, the issue seems to be not caused by Mathematica but by the maths being posed incorrectly. – Jens Sep 1 '16 at 23:42
• I'm voting to close this question as off-topic because the issue it raises is not really a Mathematica issue but a matter of the OP not having grasped the mathematics involved. – m_goldberg Sep 2 '16 at 6:31