Re: Finding unknown parameters using Mathematica

• To: mathgroup at smc.vnet.net
• Subject: [mg74747] Re: Finding unknown parameters using Mathematica
• From: dh <dh at metrohm.ch>
• Date: Tue, 3 Apr 2007 00:31:00 -0400 (EDT)
• References: <euqnl6\$894\$1@smc.vnet.net>

```
Hi Shafiq.

there is something wrong in your code. What should:"=E2=88=91" mean? I

think "Sum". Note that it is better if you change your code to InputForm

before posting it. This is done by selecting and then menu: Cell/Convert

To/InputForm.

Further, your set up of the equations is wrong. What you wrote is:

Short Form of drivative == explicite Form of derivative

(D[L,r1]==...), what shlould give True. Note that the form: D[L,r1] is

only used in differential equations. In your case you would write:

eqns={ explicite form of derivative == 0, ...}

Solve[eqns,vars]

Daniel

> 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

>

> ===================

> 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 Log[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}]

>

```

• Prev by Date: Re: Finding unknown parameters using Mathematica
• Next by Date: how to get the area of circles
• Previous by thread: Re: Finding unknown parameters using Mathematica
• Next by thread: Re: Finding unknown parameters using Mathematica