Group Abstract Group Abstract

Message Boards Message Boards

1
|
5.1K Views
|
18 Replies
|
21 Total Likes
View groups...
Share
Share this post:

Finding roots of multivariable function

Posted 1 year ago
POSTED BY: Byron Alexander
18 Replies
POSTED BY: Daniel Lichtblau
Posted 1 year ago
POSTED BY: Denis Ivanov

Absolutely right, my method should also check for when the log is -Infinity (a boundary case, with this transformation). And, as you note, this happens at multiples of Pi. I should have caught that. Thanks for pointing out the missing solutions.

POSTED BY: Daniel Lichtblau

One more query, is there a systematic way in Mathematica of identifying these indeterminate points from the log function itself. I don't think Mathematica has built-in functions to find these indeterminate critical points?

POSTED BY: Byron Alexander

Good question. I think one way is to find discontinuity points. Skipping some of the setup, here is hoq that could be done.

ee = -m1  Log[2] + 4  m0  Log[Cos[\[Phi]/2]] + 
   4  m2  Log[Sin[\[Phi]/2]] + 2  m1  Log[Sin[\[Phi]]];
Solve[FunctionDiscontinuities[{ee, 0 <= \[Phi] <= 2*Pi}, \[Phi]] && 
  0 <= \[Phi] <= 2*Pi, \[Phi]]

(* During evaluation of In[18]:= FunctionDiscontinuities::unkds: Warning: The set of discontinuities may be incomplete due to missing domain and discontinuity information for some of the functions involved.

Out[19]= {{\[Phi] -> 0}, {\[Phi] -> 
   0}, {\[Phi] -> \[Pi]}, {\[Phi] -> \[Pi]}, {\[Phi] -> 
   2 \[Pi]}, {\[Phi] -> 2 \[Pi]}} *)
POSTED BY: Daniel Lichtblau

Hi Daniel I am very interested in finding out why the different approaches in Mathematica yield different outcomes. If you have a chance could you please check out this post.

POSTED BY: Byron Alexander

Hi, just a note for completeness of this post. I think there is a small problem in using PowerExpand to take the Log in this way. Consider that the Sine and Cosine functions take negative values hence you cannot use the Log property of taking the respective exponents of 4 and 2 and moving them to factors in front of the Log terms. If you take the Log of L[\phi, m1, m2, m3], I don't think the log-function which you obtained is correct for this reason. Consider the attached code, where I use FullSimplify (as Ivanov noted):

POSTED BY: Byron Alexander

We take a derivative after that. Will the logs be off by something other than a constant in the variable phi?

POSTED BY: Daniel Lichtblau

The solutions are real, despite their appearance:

sol = Reduce[
  DL[\[Phi], m0, m1, m2] == 0 && 
   Element[{m0, m1, m2}, PositiveIntegers] && 
   Element[\[Phi], Reals], \[Phi]]; FullSimplify[ComplexExpand[sol], 
 m0 > 0 && m1 > 0 && m1 > 0]
POSTED BY: Gianluca Gorni
Posted 1 year ago

Hmm, may be, but they have very simple trig form finally

POSTED BY: Denis Ivanov
Posted 1 year ago
POSTED BY: Denis Ivanov

Many thanks for your response. Firstly, yes P02 = P1; P11 = P2; P20 = P3. Why is it that you seem to get a different function when you FullSimplify at the start, they don't seem to be equivalent. Please have a look at my adapted code using your what you suggest in your post:

POSTED BY: Byron Alexander
Posted 1 year ago

Yes, you are wright, looks like I mess something (
We can get firstly:
FullSimplify /@ {P1[\[Phi]] , P2[\[Phi]], P3[\[Phi]]}
$\left\{\cos ^4\left(\frac{\phi }{2}\right),\frac{\sin ^2(\phi )}{2},\sin ^4\left(\frac{\phi }{2}\right)\right\}$
Cause $\sin^2\left(\alpha/2\right)=\frac{1-\cos\left(\alpha\right)}{2}$
we can check result directly and your last post looks like fully correct!

POSTED BY: Denis Ivanov

Many thanks for your response. I attach the modified code where I attempt to explicitly show the 4th and 5th solutions (the solutions other than $\phi = {0, \pi ,2\pi}$). Do you agree with this code and the computation of the fourth and fifth roots:

Lastly, at the end of your response you stated Limit[DL[[Phi], m0, m1, m2], [Phi] -> #, Assumptions -> Element[{m0, m1, m2}, PositiveIntegers]] & /@ {0, [Pi], 2 [Pi]} {0, 0, 0} so all five solutions are valid.

But it seems that you only tested the solutions $\phi = 0, \pi ,2\pi$ yielding derivatives of {0, 0, 0}, yet you state 'so all five solutions are valid'. Could you advise on this please.

POSTED BY: Byron Alexander
Posted 1 year ago

Yes, today later i'll double check all calculations!

POSTED BY: Denis Ivanov

Thanks.

POSTED BY: Byron Alexander

The function L[ϕ,m0,m1,m2] is defined in terms of P02,P11 and P20, not of P1,P2 and P3.

Assuming that P02 = P1; P11 = P2; P20 = P3 you can do it this way:

Clear[\[Phi], m0, m1, m2, L, DL];
L[\[Phi]_, m0_, m1_, m2_] = 
  P1[\[Phi]]^m0*P2[\[Phi]]^m1*P3[\[Phi]]^m2;
DL[\[Phi]_, m0_, m1_, m2_] = 
  Simplify[D[L[\[Phi], m0, m1, m2], \[Phi]], Element[\[Phi], Reals]];
Reduce[DL[\[Phi], m0, m1, m2] == 0 &&
  Element[{m0, m1, m2}, PositiveIntegers] &&
  Element[\[Phi], Reals],
 \[Phi]]
POSTED BY: Gianluca Gorni
Posted 1 year ago

This is interesting example with some pitfalls.
When i run your code directly, I get complex result with Log function.
I suspect it is not so

POSTED BY: Denis Ivanov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard