Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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)

  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.

share|improve this question
You might be interested in this question... –  J. M. Oct 18 '12 at 16:25
I need the exact numbers (i.e. the solution). The visual way is an interesting way to look at it. I agree. –  user1755051 Oct 18 '12 at 16:31
"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. –  J. M. Oct 18 '12 at 16:34
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. –  user1755051 Oct 18 '12 at 17:29
@J.M. Oh! That fertilization moment snapshot! –  belisarius Oct 18 '12 at 20:52
show 1 more comment

migrated from stackoverflow.com Oct 18 '12 at 16:20

This question came from our site for professional and enthusiast programmers.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.