MathGroup Archive 2007

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

Search the Archive

Re: Finding unknown parameters using Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74744] Re: [mg74722] Finding unknown parameters using Mathematica
  • From: anguzman at ing.uchile.cl
  • Date: Tue, 3 Apr 2007 00:29:28 -0400 (EDT)
  • References: <200704021055.GAA08419@smc.vnet.net>

Hello:
I've been looking the system of 5 equations you quoted. I don=B4t know 
if it has a solution. Numerically ,I guess the function that could 
work in your case is FindRoot. You have to give initial values to the 
variables, e.g. all ones. I think FindRoot minimizes  the absolute 
value of the l.h.s. of your equations and determines an approximate 
solution. The problem is that the first two equations have r1 or r2 in 
the denominators, so, the numerical search tends to increase these two 
values without limit. Then I multiplied the first equation by r1 and 
the 2nd by r2  and using FindMinimum in order to minimize the sums of 
the squares of the l.h.s.'s of your equations (increasing the number 
of MaxIterations) got this:
r1    0.000090274767504370
r2    5.520801180767231e - 6
b1    2.4543955633519086
b2     3.7417707839019467
  p     864.1266904291423
That makes the first four equations approx. 10e-10 and the fifth 10e-7.
The system is very non-linear though....
I don't know. I hope this could help.
  I also suggest not to put directly the Mathematica code in the 
message because there are often problems interpreting it.

Atte. Andres Guzman



Shafiq Ahmad <shafiq.ahmad at rmit.edu.au> ha escrito:

> Dear group members,
>
> I'm very new to mathematica and trying to solve a set of non-linear system=
 =
> of equations to find the unknown parameters for a bivariate distribution. =
=
> I've 5 unknown parameters (i.e. b1,b2,r1,r2,p) and 5 set of equations.  I =
=
> tried to get the general solution , but could not. I don't know how to =
> solve these nonlinear equations to get the unknown parameters. And also =
=
> not aware how to give initial value in the solve function or any other =
> function (e.g all parameters b1,b2,r1,r2,p if I give initial boundary =
> value =1).
> In the below codes, x1 and x2 are 2 variables (e.g. data from 2 quality =
=
> characteristics; stress and strain etc. etc.)
>
> Any comments / suggestions how to solve these equation for b1,b2,r1,r2,p =
=
> where as putting intial value for all these unknown parameters =1
>
> Ahmad S.
> ===================
> n=4
> x1={1,2,3,4}
> x2={1.7,3.8,4.9,4.6}
>
>
> 4
>
> {1,2,3,4}
>
> {1.7,3.8,4.9,4.6}
>
> \!\(\*
>   RowBox[{
>     RowBox[{
>       StyleBox["L",
>         FontSize->10],
>       StyleBox["=",
>         FontSize->14],
>       StyleBox[\(n*Log[p] + n*Log[p + 1] + n*
>       Log[b1] + n*Log[r1] + n*Log[b2] + n*Log[r2] + \((b1 - 1)\) =
> \(=E2=88=91\+\(j =
>         1\)\%n Log[x1[\([
>       j]\)]]\) + \((b2 -
>         1)\) \(=E2=88=91\+\(j = 1\)\%n Log[
>           x2[\([j]\)]]\) - \((p + 2)\) \(=E2=88=91\+\(j = 1\)\%n L=
og[1 +
>            r1*\((x1[\([j]\)]^b1)\) + r2*\((x2[\([j]\)]^b2)\)]\)\),
>         FontSize->14,
>         FontColor->RGBColor[1, 0, 0]]}], "\[IndentingNewLine]",
>     StyleBox[" ",
>       FontSize->18]}]\)
>
> \!\(4.980920826406141`\ \((\(-1\) + b2)\) + \((\(-1\) + b1)\)\ \((
>             Log[2] + Log[3] + Log[
>     4])\) + 4\ Log[b1] + 4\ Log[b2] + 4\ Log[
>         p] + 4\ Log[1 + p] + 4\ Log[r1] + 4\ Log[r2] - \((2 + p)\)\ \((
>     Log[1 + r1 + 1.7`\^b2\
>     r2] + Log[1 + 2\^b1\ r1 + 3.8`\^b2\ r2] +
>         Log[1 + 4\^b1\ r1 + 4.6`\^b2\ r2] + Log[1 + 3\^b1\ r1 + =
> 4.9`\^b2\
>     r2])\)\)
>
> Eqn1=D[L,r1]\[Equal]0
>
>
> \!\(4\/r1 - \((2 +
>       p)\)\ \((1\/\(1 + r1 + 1.7`\^b2\
>           r2\) + 2\^b1\/\(1 + 2\^b1\ r1 + 3.8`\^b2\ r2\) + 4\^b1\/\(1 +
>             4\^b1\ r1 + 4.6`\^b2\ r2\) + 3\^b1\/\(1 + 3\^b1\ r1 + =
> 4.9`\^b2\ \
> r2\))\) \[Equal] 0\)
>
> Eqn2=D[L,r2]\[Equal]0
>
> \!\(4\/r2 - \((2 +
>       p)\)\ \((1.7`\^b2\/\(1 +
>           r1 + 1.7`\^b2\ r2\) + 3.8`\^b2\/\(1 + 2\^b1\ r1 + 3.8`\^b2\ r2\)=
 =
> + \
> 4.6`\^b2\/\(1 +
>             4\^b1\ r1 + 4.6`\^b2\ r2\) + 4.9`\^b2\/\(1 + 3\^b1\ r1 + =
> 4.9`\^b2\
> \ r2\))\) \[Equal] 0\)
>
> Eqn3=D[L,b1]\[Equal]0
>
> \!\(4\/b1 + Log[2] + Log[3] + Log[4] - \((
>       2 + p)\)\ \((\(2\^b1\ r1\
>         Log[2]\)\/\(1 + 2\^b1\ r1 + 3.8`\^b2\
>           r2\) + \(3\^b1\ r1\ Log[3]\)\/\(1 + 3\^b1\ r1 + 4.9`\^b2\ r2\) +=
 =
> \
> \(4\^b1\ r1\ Log[4]\)\/\(1 + 4\^b1\ r1 + 4.6`\^b2\ r2\))\) \[Equal] 0\)
>
> Eqn4=D[L,b2]\[Equal]0
>
>
> \!\(\(\(4.980920826406141`\)\(\[InvisibleSpace]\)\) +
>       4\/b2 - \((2 + p)\)\ \((\(0.5306282510621704`\ 1.7`\^b2\ r2\)\/\(1 =
=
> +
>       r1 + 1.7`\^b2\
>             r2\) + \(1.33500106673234`\ 3.8`\^b2\ r2\)\/\(1 + 2\^b1\ r1 + =
=
> \
> 3.8`\^b2\ r2\) + \(1.5260563034950492`\ 4.6`\^b2\ r2\)\/\(1 + 4\^b1\ r1 + =
=
> \
> 4.6`\^b2\ r2\) + \(1.589235205116581`\ 4.9`\^b2\ r2\)\/\(1 + 3\^b1\ r1 + =
=
> 4.9`\
> \^b2\ r2\))\) \[Equal] 0\)
>
> Eqn5=D[L,p]\[Equal]0
>
> \!\(4\/p + 4\/\(1 + p\) - Log[1 + r1 + 1.7`\^b2\
>       r2] - Log[1 + 2\^b1\ r1 + 3.8`\^b2\ r2] - Log[1 + 4\^b1\
>       r1 + 4.6`\^b2\ r2] - Log[1 + 3\^b1\ r1 + 4.9`\^b2\ r2] \[Equal] 0\)
>
> Solve[{Eqn1,Eqn2,Eqn3,Eqn4,Eqn5},{r1,r2,b1,b2,p}]
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



  • Prev by Date: (Not trivial) Definite Integration of a rational function
  • Next by Date: Re: Finding unknown parameters using Mathematica
  • Previous by thread: Finding unknown parameters using Mathematica
  • Next by thread: Re: Finding unknown parameters using Mathematica