Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Can anybody help me solving such a system of

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77474] Re: [mg77432] Can anybody help me solving such a system of
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 9 Jun 2007 05:42:21 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Use FindRoot

a = 24;
b = 5;
c = 25;
d = 4;
cA = 3;
cB = 2;
t = 5;
alpha = 0.2;

eqns = {(a - b*pA - b*(pA - cA))*(0.5 - ((d/2) (p1^2 - p2^2) -
           c (p1 - p2))/(2 t) -
        ((b/2) ((pA - disA)^2 - pA^2) + a*disA)/(2 t)) -
     ((p1 - cB) (c - d*p1) + (pA - disA - cA) (a - b*(pA - disA)) -
        (pA - cA) (a - b*(pA)))*(-(a - b*pA)/(2 t)) == 0,
   -(a - b*(pA - disA) - b (pA - disA - cA))*(0.5 +
        ((d/2) (p1^2 - p2^2) - c (p1 - p2))/(2 t) +
        ((b/2) ((pA - disA)^2 - pA^2) + a*disA)/(2 t)) -
     ((p1 - cB) (c - d*p1) + (pA - disA - cA) (a - b*(pA - disA)) -
        (pA - cA) (a - b*(pA)))*(-(a - b*(pA - disA))/(2 t)) == 0,
   ((p1 - cB) (c - d*p1) + 
        alpha*(pA - disA - cA) (a - b*(pA - disA)) -
        alpha*(pA - cA) (a - b*(pA)))*(-(c - d*p1)/(2 t)) +
     (c - d*p1 - d (p1 - cB)) (0.5 + ((d/2) (p1^2 - p2^2) -
           c (p1 - p2))/(2 t) +
        alpha*((b/2) ((pA - disA)^2 - pA^2) + a*disA)/(2 t)) == 0,
   (c - d*p2 - 
        d*(p2 - cB)) (0.5 - ((d/2) (p1^2 - p2^2) - c (p1 - p2))/(2 
           t) -
        alpha*((b/2) ((pA - disA)^2 - pA^2) + a*disA)/(2 t)) +
     (p2 - cB) (c - d*p2) (-(c - d*p2)/(2 t)) == 0};

soln = FindRoot[eqns, {{pA, 4}, {p1, 2}, {p2, 2}, {disA, 1}}]

{pA->4.55414,p1->2.30068,p2->2.26998,disA->1.10028}

(First /@ eqns) /. soln

{6.77236*10^-15,-1.11022*10^-14,7.10543*10^-15,1.77636*10^-15}


Bob Hanlon

---- loveinla at gmail.com wrote: 
> Hi, guys,
> 
> I have tried NSolve, Solve, Reduce, to solve the system below,
> however, the mathematica didn't return an answer. Can anybody know how
> to solve it using Mathematica?
> 
> The inputs are as follows:
> 
> a = 24;
> b = 5;
> c = 25;
> d = 4;
> cA = 3;
> cB = 2;
> t = 5;
> alpha = 0.2;
> Solve[{(a - b*pA - b*(pA - cA))*(0.5 - ((d/2)(
> p1^2 - p2^2) -
>     c(p1 - p2))/(2t) - ((b/2)((pA - disA)^2 - pA^2) +
>               a*disA)/(2t)) - ((p1 - cB)(
>           c - d*p1) + (
>               pA - disA - cA)(a - b*(pA - disA)) - (pA -
>                     cA)(a - b*(pA)))*(-(a - b*pA)/(2t)) ==
>               0, -(a - b*(pA - disA) - b(pA - disA - cA))*(0.5 + ((d/2)
> (
>                     p1^2 - p2^2) - c(p1 - p2))/(2t) + ((
>         b/2)((pA - disA)^2 - pA^2) + a*disA)/(2t)) - ((
>               p1 - cB)(c - d*p1) + (pA - disA - cA)(a -
>                     b*(pA - disA)) - (pA - cA)(a - b*(
>               pA)))*(-(a - b*(pA - disA))/(2t)) == 0, ((p1 -
>            cB)(c - d*p1) + alpha*(pA - disA - cA)(a - b*(
>     pA - disA)) - alpha*(pA - cA)(a - b*(pA)))*(-(
>                 c - d*p1)/(2t)) + (c - d*p1 - d(p1 - cB))(0.5 + ((d/
>               2)(p1^2 - p2^2) - c(p1 - p2))/(2t) + alpha*((
>                     b/2)((pA - disA)^2 - pA^2) + a*disA)/(
>               2t)) == 0, (c - d*p2 - d*(p2 - cB))(0.5 - ((d/
>                           2)(p1^2 - p2^2) - c(p1 - p2))/(2t) -
> alpha*((b/
>         2)((pA - disA)^2 - pA^2) + a*disA)/(2t)) + (
>               p2 - cB)(c - d*p2)(-(c - d*p2)/(2t)) == 0}, {pA, p1, p2,
> disA}]
> 
> 
> 
> Thank you in advance.
> 
> 



  • Prev by Date: New release of package SNEG
  • Next by Date: Re: Re: Re: v6: still no multiple undo?
  • Previous by thread: New release of package SNEG
  • Next by thread: licensing issues with V6.0 Financial Data