# How to find the value which minimises the residual sum of squares

I have 3 equations with 3 parameters(unknowns). I would to solve it using newton raphson method. I want to use initial values (parameters) for the Newton Raphson procedure as the value (parameters) which minimizes the residual sum of squares . how can i solve these equations. The parameters alpha,beta ang gamma >0.

  Eq1 = \[Sigma]*(1 - \[Alpha])^-(\[Beta] + 1)*Gamma[\[Beta] + 1] -
3.69348
EQ2 = \[Sigma]*((1 - \[Alpha])^-(\[Beta] + 1) -
2*(2 - \[Alpha])^-(\[Beta] + 1))*Gamma[\[Beta] + 1] - 2.0520
EQ3 = \[Sigma]*((1 - \[Alpha])^-(\[Beta] + 1) -
6*(2 - \[Alpha])^-(\[Beta] + 1) +
2*(3 - \[Alpha])^-(\[Beta] + 1))*Gamma[\[Beta] + 1] - 1.134

• These are not equations but definitions of Eq1, EQ2, EQ3. These Eq1 == 0, ..., EQ3 == 0 might be equations. Commented Feb 24, 2022 at 2:58

You probably first want to Rationalize the equations:

EQ1 = Rationalize[σ*(1 - α)^-(β + 1)*Gamma[β + 1] - 3.69348, 0];
EQ2 = Rationalize[σ*((1 - α)^-(β + 1) - 2*(2 - α)^-(β + 1))*Gamma[β + 1] - 2.0520, 0];
EQ3 = Rationalize[σ*((1 - α)^-(β + 1) - 6*(2 - α)^-(β + 1) + 2*(3 - α)^-(β + 1))*Gamma[β + 1] - 1.134, 0];


Then because $$\alpha$$ looks like a problematic parameter, plot the minimum of EQ1^2 + EQ2^2 + EQ3^2 given values of $$\alpha$$:

LogPlot[FindMinimum[EQ1^2 + EQ2^2 + EQ3^2, {σ, β}][[1]], {\Alpha], -2, 5}]


So a plausible minimum value would seem to occur near $$\alpha=1$$.

• NMinimize[{Total[Rationalize[{Eq1, Eq2, Eq3}]^2], α < 1, β > -1}, {α, β, σ}, WorkingPrecision -> 21] // N Commented Feb 24, 2022 at 7:26
• @jimb @bob-hanlon I want to solve the above equations using newton method. I have to choose the initial value as the value (params) which minimizes the residual sum of squares . The params (α, β and σ) must be >0. When I tried the estimates that I got using above code in newton , I'm getting -ve estimates. sol = Module[{s = 0, e = 0}, {FindRoot[{Eq1 == 0, Eq2 == 0, Eq3 == 0}, {{\[Alpha], 0.41}, {\[Beta], 0.6}, {\[Sigma], 1.18}}, WorkingPrecision -> 21, StepMonitor :> s++, EvaluationMonitor :> e++], "Steps" -> s, "Evaluations" -> e}]  Not sure with the code. Commented Feb 24, 2022 at 13:53