Message Boards Message Boards

0
|
7382 Views
|
12 Replies
|
0 Total Likes
View groups...
Share
Share this post:

solve equation system for five order

Posted 10 years ago

Good night everybody, I need to solve the system:

NSolve[       {  7.61 == -((26.3 + 7.6*Rs)/Rp) - 1*(-1 + E^((38.91* (26.3 + 7.61* Rs))/A)) *Io + Ip,
           8.21 == -((8.21* Rs)/Rp) - 1*(-1 + E^((319.51* Rs)/A)) *Io + Ip, 
           0 == -(32.9/Rp) - 1*(-1 + E^(1280.38/(A))) *Io + Ip,
           6.62 == -((6.62* Rs)/Rp) - 1*(-1 + E^((239.92*Rs)/A)) *Io + Ip,
           0 == -(29.9/Rp) - 1*(-1 + E^(1083.66/(A))) *Io + Ip},
            {Io, Ip, A, Rs, Rp}]

But I don't know if the NSolve command is appropriate. if someone have idea for solve this, help me please

Thank you!

12 Replies

Probably you will need FindRoot instead. The input is a mix of polynomial and exponential terms and NSolve really is not equipped to handle that latter.

POSTED BY: Daniel Lichtblau

I worked with FindRoot too, but the answer was not validate. I have problem when work with FindRoot because it need initials values

Sometimes I get better results, at least for real valued roots, by taking a sum of squares and invoking FindMinimum or NMinimize. That latter is especially helpful when I do not have a good idea for initial values.

POSTED BY: Daniel Lichtblau

This is the file, can you help me?

Attachments:

I applied the NSolve, FindRoots, FindMinimum commands and the answer isn't solve the equations.

I don't know if you see the file, but I think that Mathematica have to command for true answer

I reran NMinimize, giving it 0 as an objective function, along with the constraints. It returned an answer, but with a warning message that the obtained solution did not satisfy the constraints within tolerance. The answer obtained was

{0., {Subscript[i, ph] -> 1.42325, Subscript[i, o] -> 36.4052, 
  A -> -3.62571, Rs -> 0.00234389, Rp -> 0.841729}}

Those values might serve as starting values for FindRoot.

POSTED BY: Frank Kampas

I'm, I don't understand, how did you apply to NMinimize Command? "giving it 0 as an objective function, along with the constraints. " Can you tell me?

In[21]:= NMinimize[{0, 
  7.61 == 0. - (26.3 + 7.6*Rs)/Rp - 
    1. (-1 + E^((38.91741123737115* (26.3 + 7.61* Rs))/A)) Subscript[
     i, o] + Subscript[i, ph],
     8.21 == 
   0. - (8.21* Rs)/Rp - 
    1. (-1 + E^((319.51194625881715* Rs)/A)) Subscript[i, o] + 
    Subscript[i, ph], 
     0 == 0. - 32.9/Rp - 
    1. (-1 + E^(1280.3828297095108/A)) Subscript[i, o] + Subscript[i, 
    ph],
     6.62 == 
   0. - (6.62* Rs)/Rp - 
    1. (-1 + E^((239.92927434638457 *Rs)/A)) Subscript[i, o] + 
    Subscript[i, ph],
     0 == 0. - 29.9/Rp - 
    1. (-1 + E^(1083.668474766903/A)) Subscript[i, o] + Subscript[i, 
    ph]},
       {Subscript[i, ph], Subscript[i, o], A, Rs, Rp}]

During evaluation of In[21]:= NMinimize::nosat: Obtained solution does not satisfy the following constraints within Tolerance -> 0.001`: {0. +29.9/Rp+1. (-1+E^(1083.67/A)) Subscript[i, o]-Subscript[i, ph]==0,0. +32.9/Rp+1. (-1+E^(1280.38/A)) Subscript[i, o]-Subscript[i, ph]==0,6.62 +<<4>>==0,8.21 +(8.21 Rs)/Rp+1. (-1+E^(<<1>>/A)) Subscript[i, o]-Subscript[i, ph]==0,7.61 +(26.3 +7.6 Rs)/Rp+1. (-1+E^((38.9174 (<<5>> +<<1>>))/A)) Subscript[i, o]-Subscript[i, ph]==0}. >>

Out[21]= {0., {Subscript[i, ph] -> 1.42325, 
  Subscript[i, o] -> 36.4052, A -> -3.62571, Rs -> 0.00234389, 
  Rp -> 0.841729}}
POSTED BY: Frank Kampas

Could alternatively subtract lhs from rhs of each equation, square, and sum those as an objective function for an unconstrained optimization (maybe you also tried that though).

POSTED BY: Daniel Lichtblau

Tried that and got a SystemException[MemoryAllocationFailure...]. Perhaps the problem is singular?

POSTED BY: Frank Kampas

Thank you very much, with your help the answer is successful

POSTED BY: Daniel Lichtblau
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