3
$\begingroup$

I am trying to solve a set of three non-linear equations in Mathematica. I need help with them. The Mathematica code (in plain text format) is attached below. If you copy & paste the code below into a Notebook the actual input will become clear. It is too complicated to be typed up, hence I am displaying it in this way.

I cannot seem to converge to a solution which is correct. I can get answers but I don't think that makes sense based on the problem that I am doing. Neither χ nor Δ should go to zero.


Defining the functions first (copy & paste in a Notebook)


tχfn[x_?NumericQ,y_?NumericQ,μ_?NumericQ,χ_?NumericQ,Δ_?NumericQ] :=
  (Cos[x]+Cos[x/2+Sqrt[3]/2 y]+Cos[x/2-Sqrt[3]/2 y]-μ)^2/Sqrt[4 χ^2 (Cos[x]+
   Cos[x/2+Sqrt[3]/2 y]+Cos[x/2-Sqrt[3]/2 y]-μ)^2+4 Δ^2 (Cos[x]+Cos[x/2+Sqrt[3]/2 y]+
   Cos[x/2-Sqrt[3]/2 y])^2]

tΔfn[x_?NumericQ,y_?NumericQ,μ_?NumericQ,χ_?NumericQ,Δ_?NumericQ] :=
  (Cos[x]+Cos[x/2+Sqrt[3]/2 y]+Cos[x/2-Sqrt[3]/2 y])^2/Sqrt[4 χ^2 (Cos[x]+
   Cos[x/2+Sqrt[3]/2 y]+Cos[x/2-Sqrt[3]/2 y]-μ)^2+4 Δ^2 (Cos[x]+Cos[x/2+Sqrt[3]/2 y]+
   Cos[x/2-Sqrt[3]/2 y])^2]

tμfn[x_?NumericQ,y_?NumericQ,μ_?NumericQ,χ_?NumericQ,Δ_?NumericQ] :=
  (χ^2 (Cos[x]+Cos[x/2+Sqrt[3]/2 y]+Cos[x/2-Sqrt[3]/2 y]-μ))/Sqrt[4 χ^2 (Cos[x]+
   Cos[x/2+Sqrt[3]/2 y]+Cos[x/2-Sqrt[3]/2 y]-μ)^2+4 Δ^2 (Cos[x]+Cos[x/2+Sqrt[3]/2 y]+
   Cos[x/2-Sqrt[3]/2 y])^2]

Setting up the non-linear solution (copy paste in a notebook)


FindRoot[
 {
  NIntegrate[tχfn[x, y, μ, χ, Δ], {x, (4*Pi)/3, (10*Pi)/3}, {y, 0, (4*Pi)/Sqrt[3]},
             Method -> "MultiPeriodic"] == 1.5,
  NIntegrate[tΔfn[x, y, μ, χ, Δ], {x, (4*Pi)/3, (10*Pi)/3}, {y, 0, (4*Pi)/Sqrt[3]},
             Method -> "MultiPeriodic"] == 1.5,
  NIntegrate[tμfn[x, y, μ, χ, Δ], {x, (4*Pi)/3, (10*Pi)/3}, {y, 0, (4*Pi)/Sqrt[3]},
             Method -> "MultiPeriodic"] == 0.125
 },
 {{μ, 0.02}, {χ, 1.}, {Δ, 1.}},
 Evaluated -> False
]

I have tried without the "MultiPeriodic" option, with "MonteCarlo" option, and even used the basic default option.

$\endgroup$
6
  • $\begingroup$ You might be interested in this question... $\endgroup$ Oct 18, 2012 at 16:25
  • $\begingroup$ I need the exact numbers (i.e. the solution). The visual way is an interesting way to look at it. I agree. $\endgroup$ Oct 18, 2012 at 16:31
  • $\begingroup$ "I need the exact numbers" - you won't get exact numbers from NIntegrate[] or FindRoot[]; all they do is give approximations. The method in that post I linked to computes numerical solutions as well, though it uses plotting functions internally. $\endgroup$ Oct 18, 2012 at 16:34
  • $\begingroup$ Yes. I see you did provide the solution. But I have integrals which I need to solve before obtaining the solution to the non-linear equation. I am not quite sure how to manage that in the approach that you mentioned. Thanks. $\endgroup$ Oct 18, 2012 at 17:29
  • $\begingroup$ @J.M. Oh! That fertilization moment snapshot! $\endgroup$ Oct 18, 2012 at 20:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.