I am trying to find, analytically, the $\theta,\phi$ that minimize the function U($\theta,\phi$)
Clear[h, d]
m = {Sin[θ] Cos[ϕ], Sin[θ] Sin[ϕ], Cos[θ]};
n = {Sin[θn] Cos[ϕn], Sin[θn] Sin[ϕn],Cos[θn]};
H = h {0, 0, 1};
U = -H.m - d (n.m)^2
where h
and d
are positive. θn
and ϕn
are fixed variables.
How can I find the value of $\theta,\phi$ that minimizes U($\theta,\phi$)?
I tried to use
Minimize[{U, h > 0, d > 0}, {θ, ϕ}]
It is not successful, Mathematica just returns the input as the output.
What is the proper way of doing this problem?
Update
I solved it manually. $dU/d\phi=0$ leads to $\phi=\phi_n$ or $\pi+\phi_n/\pi$, and, therefore, $dU/d\theta=0$ gives the equation for $\theta$ as
$\qquad h\sin\theta+d\sin[2(\theta\pm\theta_n)]=0$
Mathmematica is able to give a long analytical solution. I have to use a numerical result for given values of d,h,$\theta_n$, $\phi_n$.
θn
or:θ*n
? $\endgroup$