\( \newcommand{\nPr}[2]{{}^{#1}A_{#2} } \newcommand{\combin}[2]{{}^{#1}C_{#2} } \newcommand{\cmod}[3]{#1 \equiv #2\left(\bmod {}{#3}\right)} \newcommand{\frc}[2]{\displaystyle\frac{#1}{#2}} \newcommand{\mdc}[2]{\left( {#1},{#2}\right)} \newcommand{\mmc}[2]{\left[ {#1},{#2}\right]} \newcommand{\cis}{\mathop{\rm cis}} \newcommand{\ImP}{\mathop{\rm Im}} \newcommand{\ReP}{\mathop{\rm Re}} \newcommand{\sen}{\mathop{\rm sen}} \newcommand{\tg}{\mathop{\rm tg}} \newcommand{\cotg}{\mathop{\rm cotg}} \newcommand{\cosec}{\mathop{\rm cosec}} \newcommand{\cotgh}{\mathop{\rm cotgh}} \newcommand{\cosech}{\mathop{\rm cosech}} \newcommand{\sech}{\mathop{\rm sech}} \newcommand{\sh}{\mathop{\rm sh}} \newcommand{\ch}{\mathop{\rm ch}} \newcommand{\th}{\mathop{\rm th}} \newcommand{\senEL}[1]{\mathop{\rm sen}^{#1}} \newcommand{\tgEL}[1]{\mathop{\rm tg}^{#1}} \newcommand{\cotgEL}[1]{\mathop{\rm cotg}^{#1}} \newcommand{\cosecEL}{\mathop{\rm cosec}^{#1}} \newcommand{\shEL}[1]{\mathop{\rm sh^{#1}}} \newcommand{\chEL}[1]{\mathop{\rm ch^{#1}}} \newcommand{\thEL}[1]{\mathop{\rm th^{#1}}} \newcommand{\cotghEL}[1]{\mathop{\rm cotgh^{#1}}} \newcommand{\cosechEL}[1]{\mathop{\rm cosech^{#1}}} \newcommand{\sechEL}[1]{\mathop{\rm sech^{#1}}} \newcommand{\senq}{\senEL{2}} \newcommand{\tgq}{\tgEL{2}} \newcommand{\cotgq}{\cotgEL{2}} \newcommand{\cosecq}{\cosecEL{2}} \newcommand{\cotghq}{\cotghEL{2}} \newcommand{\cosechq}{\cosechEL{2}} \newcommand{\sechq}{\sechEL{2}} \newcommand{\shq}{\shEL{2}} \newcommand{\chq}{\chEL{2}} \newcommand{\arctg}{\mathop{\rm arctg}} \newcommand{\arcsen}{\mathop{\rm arcsen}} \newcommand{\argsh}{\mathop{\rm argsh}} \newcommand{\argch}{\mathop{\rm argch}} \newcommand{\Var}{\mathop{\rm Var}} \newcommand{\vect}[1]{\overrightarrow{#1}} \newcommand{\tr}[1]{ \textnormal{Tr}\left({#1}\right)} \newcommand{\C}{\mathbb{C}} \newcommand{\E}{\mathbb{E}} \newcommand{\H}{\mathbb{H}} \newcommand{\I}{\mathbb{I}} \newcommand{\N}{\mathbb{N}} \newcommand{\P}{\mathbb{P}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\til}{\sim} \newcommand{\mdc}{\mathop{\rm m.d.c.}} \newcommand{\mmc}{\mathop{\rm m.m.c.}} \newcommand{\vect}[1]{\overrightarrow{#1}} \newcommand{\dfrc}{\displaystyle\frac} \newcommand{\Mod}[1]{\ (\mathrm{mod}\ #1)} \)

20/07/2019

O operador Laplaciano em coordenadas polares e em coordenadas esféricas

O operador Laplaciano apareceu-me muitas vezes em problemas com equações diferenciais com derivadas parciais, em problemas de electromagnetismo, e mais recentemente em problemas de mecânica quântica. Muitas vezes é necessário fazer uma mudança de variáveis, para coordenadas polares, esféricas, cilíndricas...
Normalmente, as fórmulas são dadas, sem qualquer dedução. Não porque a dedução em si seja difícil, mas porque os cálculos em si podem ser longos e não trazem nada de novo. O problema deste ponto de vista é que há quem nunca tenha visto nem feito uma dedução!
É um mero exercício de cálculo e de aplicação de principalmente da regra da derivação do produto e da regra da cadeia, para quem quiser fazer.
...E que proponho que se faça! Clicando nos botões podem ver a minha solução e a minha resolução. Sugiro que tente fazê-la primeiro!

O Laplaciano em coordenadas polares

Seja $f:D \subseteq \R^2 \to \R$ uma função real de variável vectorial, ou, como vai ser designação comum neste blog, um campo escalar.
Suponhamos que a função é de classe $C^2$ em $D$.
O Laplaciano de $f$ é a divergência do gradiente de $f$. \[ \nabla ^2 f = \nabla \cdot \nabla f = \dfrc{{\partial ^2 f}}{{\partial x{}^2}} + \dfrc{{\partial ^2 f}}{{\partial y{}^2}} \] Considere-se a nova função que se obtém fazendo a mudança de variáveis \[ \left\{ {\begin{array}{l} {x = r\cos \theta } \\ {y = r\sen \theta } \end{array}} \right. \] para $r>0$ e $\theta\in [0,2\pi[ $ por forma a que, a nova definição faça sentido.
Por abuso de linguagem, continuemos a designar a nova função por $f$.
Determine uma nova fórmula para $\nabla ^2 f$ em função das novas variáveis $r$ e $\theta$.
\[\nabla ^2 f=\dfrc{{\partial ^2 f}}{{\partial r^2 }} + \dfrc{1}{r}\dfrc{\partial f}{\partial r} + \dfrc{1}{{r^2 }}\dfrc{{\partial ^2 f}}{{\partial \theta ^2 }}\]
(Carlos Paulo A. de Freitas; 19/07/2019)
\[ \left\{ {\begin{array}{l} {x = r\cos \theta } \\ {y = r\sen \theta } \end{array}} \right. \Rightarrow \left\{ {\begin{array}{l} {r^2 = x^2 + y^2 } \\ \cos \theta = \dfrc{x}{r} \\ \sen \theta = \dfrc{y}{r} \\ \end{array}} \right. \Rightarrow \left\{ {\begin{array}{l} {2r\dfrc{\partial r}{\partial x} = 2x} \\ 2r\dfrc{\partial r}{\partial y} = 2y \\ - \sen \theta \dfrc{{\partial \theta }}{\partial x} = \dfrc{{r - x\dfrc{\partial r}{\partial x}}}{{r^2 }} \\ \cos \theta \dfrc{{\partial \theta }}{\partial y} = \dfrc{{r - y\dfrc{\partial r}{\partial y}}}{{r^2 }} \end{array}} \right. \Rightarrow \left\{ {\begin{array}{l} {\dfrc{\partial r}{\partial x} = \dfrc{x}{r} = \cos \theta } \\ \dfrc{\partial r}{\partial y} = \dfrc{y}{r} = \sen \theta \\ \dfrc{\partial \theta }{\partial x} = \dfrc{{r - r\cos ^2 \theta }}{{ - r^2 \sen \theta }} = \dfrc{{1 - \cos ^2 \theta }}{{ - r\sen \theta }} = - \dfrc{\sen \theta }{r} \\ \dfrc{\partial \theta }{\partial y} = \dfrc{r - r\sen ^2 \theta }{r^2 \cos \theta } = \dfrc{\cos \theta }{r} \end{array}} \right. \] Portanto:
${\color{red}\dfrc{\partial r}{\partial x}=\cos\theta}$ ; ${\color{green}\dfrc{\partial r}{\partial y}=\sen\theta}$ ; $\color{blue} \dfrc{\partial \theta }{\partial x}=- \dfrc{\sen \theta }{r}$ e $\color{brown} \dfrc{\partial \theta }{\partial y} =\dfrc{\cos \theta }{r}$
Estes resultados agora usam-se neste desenvolvimento: \begin{eqnarray*} { \nabla ^2 f }&{=}&{\dfrc{\partial ^2 f}{\partial x^2} + \dfrc{\partial ^2 f}{\partial y^2}}\\ {}&{=}&{\dfrc{\partial }{\partial x}\left( \dfrc{\partial f}{\partial x} \right) + \dfrc{\partial }{\partial y}\left( {\dfrc{\partial f}{\partial y}} \right)}\\ {}&{=}&{\dfrc{\partial }{\partial x}\underbrace{\left(\dfrc{\partial f}{\partial r}{\color{red}\dfrc{\partial r}{\partial x}} + \dfrc{\partial f}{\partial \theta}{\color{blue} \dfrc{\partial \theta }{\partial x}}\right)}_{\text{regra da cadeia}} + \dfrc{\partial }{\partial y}\underbrace{\left(\dfrc{\partial f}{\partial r}{\color{green}\dfrc{\partial r}{\partial y}} + \dfrc{\partial f}{\partial \theta }\color{brown} \dfrc{\partial \theta }{\partial y}\right)}_{\text{regra da cadeia}} }\\ {}&{=}&{\dfrc{\partial }{\partial x}\left( \dfrc{\partial f}{\partial r}\cos \theta - \dfrc{\partial f}{\partial \theta }\dfrc{\sen \theta }{r} \right) + \dfrc{\partial }{\partial y}\left( \dfrc{\partial f}{\partial r}\sen \theta + \dfrc{\partial f}{\partial \theta}\dfrc{\cos \theta }{r} \right)}\\ {}&{=}&{\dfrc{\partial }{\partial r}\left( {\dfrc{\partial f}{\partial r}\cos \theta - \dfrc{\partial f}{\partial \theta }\dfrc{\sen \theta }{r}} \right){\color{red}\dfrc{\partial r}{\partial x}} + \dfrc{\partial }{\partial \theta }\left( {\dfrc{\partial f}{\partial r}\cos \theta - \dfrc{\partial f}{\partial \theta }\dfrc{\sen \theta }{r}} \right){\color{blue} \dfrc{\partial \theta }{\partial x}}}\\ {}&{ }&{+ \dfrc{\partial }{\partial r}\left(\dfrc{\partial f}{\partial r}\sin \theta + \dfrc{\partial f}{\partial \theta }\dfrc{\cos \theta }{r} \right){\color{green}\dfrc{\partial r}{\partial y}} + \dfrc{\partial }{\partial \theta }\left( {\dfrc{\partial f}{\partial r}\sin \theta + \dfrc{\partial f}{\partial \theta }}\dfrc{\cos \theta }{r} \right){\color{brown} \dfrc{\partial \theta }{\partial y}} }\\ {}&{}&{\text{(regra da cadeia)}}\\ {}&{=}&{\left( \dfrc{\partial ^2 f}{\partial r^2 }\cos \theta + \dfrc{\sen \theta}{r^2 }\dfrc{\partial f}{\partial \theta} - \dfrc{\sen \theta}{r}\dfrc{\partial ^2 f}{\partial r\partial \theta } \right){\color{red}\dfrc{\partial r}{\partial x}} + \left( {\dfrc{\partial ^2 f}{\partial \theta \partial r}\cos \theta - \dfrc{\partial f}{\partial r}\sin \theta - \dfrc{\cos \theta}{r}\dfrc{\partial f}{\partial \theta} - \dfrc{\sen \theta}{r}\dfrc{\partial ^2 f}{\partial \theta ^2 }} \right){\color{blue} \dfrc{\partial \theta }{\partial x}} }\\ {}&{}&{+ \left( \dfrc{\partial ^2 f}{\partial r^2 }\sin \theta - \dfrc{\cos \theta}{r^2 }\dfrc{\partial f}{\partial \theta} + \dfrc{\cos \theta}{r}\dfrc{\partial ^2 f}{\partial r\partial \theta } \right){\color{green}\dfrc{\partial r}{\partial y}} + \left( \dfrc{\partial ^2 f}{\partial \theta \partial r}\sin \theta + \dfrc{\partial f}{\partial r}\cos \theta - \dfrc{\sen \theta}{r}\dfrc{\partial f}{\partial \theta} + \dfrc{\cos \theta}{r}\dfrc{\partial ^2 f}{\partial \theta ^2 } \right){\color{brown}\dfrc{\partial \theta}{\partial y}} }\\ {}&{=}&{\dfrc{\partial ^2 f}{\partial r^2 }\cos ^2 \theta + \dfrc{\sin \theta \cos \theta }{r^2 }\dfrc{\partial f}{\partial \theta} - \dfrc{\sen \theta \cos \theta }{r}\dfrc{\partial ^2 f}{\partial r\partial \theta } - \dfrc{\sen \theta \cos \theta }{r}\dfrc{\partial ^2 f}{\partial \theta \partial r} + \dfrc{\partial f}{\partial r}\dfrc{\sin ^2 \theta }{r} + \dfrc{\sin \theta \cos \theta }{r^2 }\dfrc{\partial f}{\partial \theta} + \dfrc{\sin ^2 \theta }{r^2 }\dfrc{\partial ^2 f}{\partial \theta ^2 } }\\ {}&{ }&{+ \dfrc{\partial ^2 f}{\partial r^2 }\sin ^2 \theta - \dfrc{\sin \theta \cos \theta }{r^2 }\dfrc{\partial f}{\partial \theta} + \dfrc{\sen \theta \cos \theta }{r}\dfrc{\partial ^2 f}{\partial r\partial \theta } + \dfrc{\sin \theta \cos \theta }{r}\dfrc{\partial ^2 f}{\partial \theta \partial r} + \dfrc{\partial f}{\partial r}\dfrc{\cos ^2 \theta }{r} - \dfrc{\sen \theta \cos \theta }{r^2 }\dfrc{\partial f}{\partial \theta} + \dfrc{\cos ^2 \theta }{r^2 }\dfrc{\partial ^2 f}{\partial \theta ^2 } }\\ {}&{=}&{\dfrc{\partial ^2 f}{\partial r^2 } + \dfrc{1}{r}\dfrc{\partial f}{\partial r} + \dfrc{1}{r^2 }\dfrc{\partial ^2 f}{\partial \theta ^2 }} \end{eqnarray*}

O Laplaciano em coordenadas esféricas

Seja $f:D \subseteq \R^3 \to \R$ um campo escalar.
Suponhamos que a função é de classe $C^2$ em $D$.
O Laplaciano de $f$ é a divergência do gradiente de $f$. \[ \nabla ^2 f = \nabla \cdot \nabla f = \dfrc{\partial ^2 f}{\partial x^2} + \dfrc{\partial ^2 f}{\partial y^2}+ \dfrc{\partial ^2 f}{\partial z^2} \] Considere-se a nova função que se obtém fazendo a mudança de variáveis \[ \left\{ {\begin{array}{l} {x = r\sen \theta \cos \phi} \\ {y = r\sen \theta \sen \phi} \\ {z = r\cos \theta} \end{array}} \right. \] para $r>0$, $\theta\in [0,\pi[ $ e $\phi\in [0,2\pi[ $ por forma a que, a nova definição faça sentido.
Por abuso de linguagem, continuemos a designar a nova função por $f$.
Mostre que \[ \nabla ^2 f = \frac{1}{r^2}\left[\frac{\partial}{\partial r} \left( {r^2}\dfrc{\partial f}{\partial r} \right) + \frac{1}{ \sen \theta }\frac{\partial }{{\partial \theta }}\left( {\sen \theta \frac{{\partial f}}{{\partial \theta }}} \right) + \frac{1}{{ \sen ^2 \theta }}\frac{{\partial ^2 f}}{{\partial \phi ^2 }}\right] \]
Nota: Em breve deixo a minha dedução, análoga à dedução da fórmula em coordenadas polares.

01/07/2019

Uma equação com problemas (I)

Há uns meses chegou-me um explicando com o seguinte problema.

Seja $k\in \R \backslash \{0\} $. Calcule um valor de $k$ de modo que:
\[
\int\limits_k^\pi  {\frac{1}{{\left( {2 + \sin ^2 \left( {2x} \right)} \right)\cos ^{ - 1} \left( {2x} \right)}}dx =  - \frac{{\sqrt 2 }}{2}\pi }
\]

Ao resolver a equação percebi que a equação era impossível!
Abaixo (botão) deixo a minha resolução feita nesse dia.


\begin{eqnarray*} {\int\limits_k^\pi {\frac{1}{{\left( {2 + \sin ^2 \left( {2x} \right)} \right)\cos ^{ - 1} \left( {2x} \right)}}dx}}& {=} &{ - \frac{{\sqrt 2 }}{2}\pi }\\ {\Leftrightarrow \int\limits_k^\pi {\frac{{\cos \left( {2x} \right)}}{{2 + \sin ^2 \left( {2x} \right)}}dx}}&{ = }&{ - \frac{{\sqrt 2 }}{2}\pi }\\ {\Leftrightarrow \frac{1}{2}\int\limits_k^\pi {\frac{{\cos \left( {2x} \right)}}{{1 + \left( {\displaystyle\frac{{\sin \left( {2x} \right)}}{{\sqrt 2 }}} \right)^2 }}dx}} &{=}& { - \frac{{\sqrt 2 }}{2}\pi }\\ {\Leftrightarrow \frac{1}{2}\frac{{\sqrt 2 }}{2}\int\limits_k^\pi {\displaystyle\frac{{\displaystyle\frac{2}{{\sqrt 2 }}\cos \left( {2x} \right)}}{{1 + \left( {\displaystyle\frac{{\sin \left( {2x} \right)}}{{\sqrt 2 }}} \right)^2 }}dx}}&{ = }&{ - \frac{{\sqrt 2 }}{2}\pi } \\ {\Leftrightarrow \int\limits_k^\pi {\frac{{\displaystyle\frac{2}{{\sqrt 2 }}\cos \left( {2x} \right)}}{{1 + \left( {\displaystyle\frac{{\sin \left( {2x} \right)}}{{\sqrt 2 }}} \right)^2 }}dx}}&{ = }& { - 2\pi } \\ {\Leftrightarrow - \arctg\left( {\frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }}} \right)}&{ = }&{ - 2\pi } \\ {\Leftrightarrow \arctg\left( {\frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }}} \right)}&{ = }&{ 2\pi } \\ \end{eqnarray*} Uma vez que o contradomínio da função arcotangente é $\left] { -\displaystyle \frac{\pi }{2},\displaystyle\frac{\pi }{2}} \right[$, a equação obtida é impossível.
Quero que compreendam que mesmo deslocando o contradomínio do arcotangente por um múltiplo inteiro de $\pi$, a equação original continua a ser impossível, visto que essa constante "desapareceria" no decorrer dos cálculos (nomeadamente depois de aplicação da regra de Barrow).


Escrever \[{\frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }}}=\tg (2\pi)\] É um erro gravíssimo!!! (e que demonstra sério e grave desconhecimento do que se anda a fazer)!

Mas, para que não fiquem dúvidas na cabeça mais teimosa, vou provar a impossibilidade daquela equação de outra forma.
Considere-se a função: \[ F(k) = \int\limits_k^\pi {\frac{1}{{\left( {2 + \sin ^2 \left( {2x} \right)} \right)\cos ^{ - 1} \left( {2x} \right)}}dx} = - \frac{{\sqrt 2 }}{4}\arctg\left( {\frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }}} \right) \] Ora, como \[- 1 \le \sin \left( {2k} \right) \le 1 \] então \[\frac{{ - 1}}{{\sqrt 2 }} \le \frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }} \le \frac{1}{{\sqrt 2 }}\] Então isto implica que \[{{ - 1}} \leq \frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }} \leq {1}\] \[\Leftrightarrow - \frac{\pi }{4} \le \arctg\left( {\frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }}} \right) \le \frac{\pi }{4}\] \[ \Leftrightarrow - \frac{{\pi \sqrt 2 }}{{16}} \le - \frac{{\sqrt 2 }}{4}\arctg\left( {\frac{{\sin \left( {2k} \right)}}{{\sqrt 2 }}} \right) \le \frac{{\pi \sqrt 2 }}{{16}}\] \[ \Leftrightarrow - \frac{{\pi \sqrt 2 }}{{16}} \le F(k) \le \frac{{\pi \sqrt 2 }}{{16}}\] Esta última condição prova que $-\displaystyle\frac{{\sqrt 2 }}{2}\pi$ está fora do contradomínio de $F$, portanto a equação original é impossível.

Numa última nota:
  • Não percebi porque se exige no enunciado que $k\neq 0$.   Faz-me suspeitar que há algo de errado com o enunciado.
  • Eu 'verifiquei' numericamente as minhas afirmações antes de me dar ao trabalho de escrever isto... podia ter erros nos cálculos.
  • Como sempre, se encontrarem gralhas ou incorrecções, podem enviar-me para cpaulof at gmail dot com

Actualizações:
  • 03/07/2019: $\cos^{-1}$ deve ser interpretado como a função secante, e não como a função arco-cosseno, graças aos valores dos limites de integração.
  • 03/07/2019: em vez de $k\in\R\backslash \{0\}$ penso que $k$ deve pertencer a um subconjunto de $\R\backslash \left\{x=\displaystyle\frac{\pi}{4}+\frac{n\pi}{2}, n\in \Z\right\}$, mas não sei. O enunciado não é meu.


    \begin{eqnarray*} {D }&{=}&{ \left\{ {x \in \R:\cos \left( {2x} \right) \ne 0} \right\}}\\ {}&{ = }&{\left\{ {x \in \R:2x \ne \frac{\pi }{2} + n\pi ;n \in \Z} \right\}}\\ {}&{ = }&{ \left\{ {x \in \R:x \ne \frac{\pi }{4} + \frac{{n\pi }}{2};n \in \Z} \right\}} \end{eqnarray*}
  • 09/11/2021: Encontrei uma gralha, mas corrigi... ninguém se deu ao trabalho de me avisar!