Message Boards Message Boards

Solving system of equations using NSolve?

Posted 3 years ago

Dear community I am a novice user of Mathematica. I am trying to find a solution to the following system of equation. Solution should be (Alpha = 0.7, Sigma = 0.7) Moreover, any hint about solving system of equation?

V1[x1_, \[Sigma]_] = x1^\[Sigma]

V2[y1_, \[Sigma]_] = y1^\[Sigma]

F1[p1_] = Log[1/p1]

F11[p1_, \[Alpha]_] = 1/Exp[(F1[p1])^\[Alpha]]

V3[x2_, \[Sigma]_] = x2^\[Sigma]

V4[y2_, \[Sigma]_] = y2^\[Sigma]

F2[p2_] = Log[1/p2]

F22[p2_, \[Alpha]_] = 1/Exp[(F2[p2])^\[Alpha]]

NSolve[{V2[
     10, \[Sigma]] + (F11[
       0.3, \[Alpha]]*(V1[40, \[Sigma]] - V2[10, \[Sigma]])) == 
   V3[5, \[Sigma]] + (F22[
       0.1, \[Alpha]]*(V3[150, \[Sigma]] - V4[5, \[Sigma]])), 
  V2[30, \[Sigma]] + (F11[
       0.9, \[Alpha]]*(V1[40, \[Sigma]] - V2[30, \[Sigma]])) == 
   V3[5, \[Sigma]] + (F22[
       0.7, \[Alpha]]*(V3[68, \[Sigma]] - 
        V4[5, \[Sigma]]))}, {\[Alpha], \[Sigma]}]
POSTED BY: Ruggiero Rippo
3 Replies

I would first get an idea of where a solution might be using a plot:

eqs = {V2[
      10, \[Sigma]] + (F11[
        3/10, \[Alpha]]*(V1[40, \[Sigma]] - V2[10, \[Sigma]])) == 
    V3[5, \[Sigma]] + (F22[
        1/10, \[Alpha]]*(V3[150, \[Sigma]] - V4[5, \[Sigma]])), 
   V2[30, \[Sigma]] + (F11[
        9/10, \[Alpha]]*(V1[40, \[Sigma]] - V2[30, \[Sigma]])) == 
    V3[5, \[Sigma]] + (F22[
        7/10, \[Alpha]]*(V3[68, \[Sigma]] - V4[5, \[Sigma]]))};
ContourPlot[Evaluate@eqs, {\[Alpha], -2, 2}, {\[Sigma], -2, 2}]

and then approximate it with an iterative method:

In[93]:= FindRoot[eqs, {{\[Alpha], 0.7}, {\[Sigma], 0.7}}]

Out[93]= {\[Alpha] -> 0.713928, \[Sigma] -> 0.636601}
POSTED BY: Gianluca Gorni
Posted 3 years ago

Thank you it is a very intuitive method. How do you decide your intial value for the contourPlot? Randomly? Thank you very much.

POSTED BY: Ruggiero Rippo

At the first attempt the plot range was random, but I was lucky. Then I collected the coordinates of the intersection with the mouse, using the "get coordinates" tool. IĀ used that value as seed for FindRoot.

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

Group Abstract Group Abstract