Message Boards Message Boards

Solving system of equations using NSolve?

Posted 3 years ago
POSTED BY: Ruggiero Rippo
3 Replies

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
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

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
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