Numerical solution to a system of equations












1












$begingroup$


Let $ninmathbb{N}$ and $u_1,u_2,ldots ,u_n,t_1,t_2geq 0$ be constants. I'm interested in finding the numerical solution in relation to $alpha$ and $beta$ to the following system of equations
$$begin{cases}
sum_{i=1}^n left( frac{u_i}{beta}right)^alpha=t_1\
sum_{i=1}^n lnleft[ left( frac{u_i}{beta}right)^alpharight]=t_2
end{cases}.$$

My current solution is to extract $beta$ from the second equation, insert it into the first and find the solution $alpha$ with the halving algorithm. We get
$$begin{cases} sum_{i=1}^n left( u_i/expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)right)^alpha=t_1\ beta = expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)end{cases}.$$
For values
$$u_1=1.20167063$$
$$u_2=2.30434494$$
$$u_3=1.20587080$$
$$u_4=0.59277441$$
$$u_5=0.06592318$$
$$t_1=12.5$$
$$t_2=37.5$$
The solution is $alphaapprox 10^{-4}$ and $beta approx exp(10^4)$. Any ideas on how I can avoid $beta$ blowing up?










share|cite|improve this question









$endgroup$












  • $begingroup$
    What is wrong with "$beta$ blowing up" ?
    $endgroup$
    – Yves Daoust
    Jan 14 at 14:20










  • $begingroup$
    The obvious reason is that using numbers of that magnitude is not practical in a programming language like R.
    $endgroup$
    – Rasmus Erlemann
    Jan 14 at 15:18










  • $begingroup$
    I can't make sense of what you say. You provide an equation and don't want to accept its solution value ?! By the way, $10^4$ is not a large number.
    $endgroup$
    – Yves Daoust
    Jan 14 at 16:38


















1












$begingroup$


Let $ninmathbb{N}$ and $u_1,u_2,ldots ,u_n,t_1,t_2geq 0$ be constants. I'm interested in finding the numerical solution in relation to $alpha$ and $beta$ to the following system of equations
$$begin{cases}
sum_{i=1}^n left( frac{u_i}{beta}right)^alpha=t_1\
sum_{i=1}^n lnleft[ left( frac{u_i}{beta}right)^alpharight]=t_2
end{cases}.$$

My current solution is to extract $beta$ from the second equation, insert it into the first and find the solution $alpha$ with the halving algorithm. We get
$$begin{cases} sum_{i=1}^n left( u_i/expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)right)^alpha=t_1\ beta = expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)end{cases}.$$
For values
$$u_1=1.20167063$$
$$u_2=2.30434494$$
$$u_3=1.20587080$$
$$u_4=0.59277441$$
$$u_5=0.06592318$$
$$t_1=12.5$$
$$t_2=37.5$$
The solution is $alphaapprox 10^{-4}$ and $beta approx exp(10^4)$. Any ideas on how I can avoid $beta$ blowing up?










share|cite|improve this question









$endgroup$












  • $begingroup$
    What is wrong with "$beta$ blowing up" ?
    $endgroup$
    – Yves Daoust
    Jan 14 at 14:20










  • $begingroup$
    The obvious reason is that using numbers of that magnitude is not practical in a programming language like R.
    $endgroup$
    – Rasmus Erlemann
    Jan 14 at 15:18










  • $begingroup$
    I can't make sense of what you say. You provide an equation and don't want to accept its solution value ?! By the way, $10^4$ is not a large number.
    $endgroup$
    – Yves Daoust
    Jan 14 at 16:38
















1












1








1





$begingroup$


Let $ninmathbb{N}$ and $u_1,u_2,ldots ,u_n,t_1,t_2geq 0$ be constants. I'm interested in finding the numerical solution in relation to $alpha$ and $beta$ to the following system of equations
$$begin{cases}
sum_{i=1}^n left( frac{u_i}{beta}right)^alpha=t_1\
sum_{i=1}^n lnleft[ left( frac{u_i}{beta}right)^alpharight]=t_2
end{cases}.$$

My current solution is to extract $beta$ from the second equation, insert it into the first and find the solution $alpha$ with the halving algorithm. We get
$$begin{cases} sum_{i=1}^n left( u_i/expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)right)^alpha=t_1\ beta = expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)end{cases}.$$
For values
$$u_1=1.20167063$$
$$u_2=2.30434494$$
$$u_3=1.20587080$$
$$u_4=0.59277441$$
$$u_5=0.06592318$$
$$t_1=12.5$$
$$t_2=37.5$$
The solution is $alphaapprox 10^{-4}$ and $beta approx exp(10^4)$. Any ideas on how I can avoid $beta$ blowing up?










share|cite|improve this question









$endgroup$




Let $ninmathbb{N}$ and $u_1,u_2,ldots ,u_n,t_1,t_2geq 0$ be constants. I'm interested in finding the numerical solution in relation to $alpha$ and $beta$ to the following system of equations
$$begin{cases}
sum_{i=1}^n left( frac{u_i}{beta}right)^alpha=t_1\
sum_{i=1}^n lnleft[ left( frac{u_i}{beta}right)^alpharight]=t_2
end{cases}.$$

My current solution is to extract $beta$ from the second equation, insert it into the first and find the solution $alpha$ with the halving algorithm. We get
$$begin{cases} sum_{i=1}^n left( u_i/expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)right)^alpha=t_1\ beta = expleft( frac1n sum_{i=1}^nln u_i-frac{t_2}{nalpha}right)end{cases}.$$
For values
$$u_1=1.20167063$$
$$u_2=2.30434494$$
$$u_3=1.20587080$$
$$u_4=0.59277441$$
$$u_5=0.06592318$$
$$t_1=12.5$$
$$t_2=37.5$$
The solution is $alphaapprox 10^{-4}$ and $beta approx exp(10^4)$. Any ideas on how I can avoid $beta$ blowing up?







numerical-methods systems-of-equations gamma-distribution






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 14 at 13:44









Rasmus ErlemannRasmus Erlemann

2,34521325




2,34521325












  • $begingroup$
    What is wrong with "$beta$ blowing up" ?
    $endgroup$
    – Yves Daoust
    Jan 14 at 14:20










  • $begingroup$
    The obvious reason is that using numbers of that magnitude is not practical in a programming language like R.
    $endgroup$
    – Rasmus Erlemann
    Jan 14 at 15:18










  • $begingroup$
    I can't make sense of what you say. You provide an equation and don't want to accept its solution value ?! By the way, $10^4$ is not a large number.
    $endgroup$
    – Yves Daoust
    Jan 14 at 16:38




















  • $begingroup$
    What is wrong with "$beta$ blowing up" ?
    $endgroup$
    – Yves Daoust
    Jan 14 at 14:20










  • $begingroup$
    The obvious reason is that using numbers of that magnitude is not practical in a programming language like R.
    $endgroup$
    – Rasmus Erlemann
    Jan 14 at 15:18










  • $begingroup$
    I can't make sense of what you say. You provide an equation and don't want to accept its solution value ?! By the way, $10^4$ is not a large number.
    $endgroup$
    – Yves Daoust
    Jan 14 at 16:38


















$begingroup$
What is wrong with "$beta$ blowing up" ?
$endgroup$
– Yves Daoust
Jan 14 at 14:20




$begingroup$
What is wrong with "$beta$ blowing up" ?
$endgroup$
– Yves Daoust
Jan 14 at 14:20












$begingroup$
The obvious reason is that using numbers of that magnitude is not practical in a programming language like R.
$endgroup$
– Rasmus Erlemann
Jan 14 at 15:18




$begingroup$
The obvious reason is that using numbers of that magnitude is not practical in a programming language like R.
$endgroup$
– Rasmus Erlemann
Jan 14 at 15:18












$begingroup$
I can't make sense of what you say. You provide an equation and don't want to accept its solution value ?! By the way, $10^4$ is not a large number.
$endgroup$
– Yves Daoust
Jan 14 at 16:38






$begingroup$
I can't make sense of what you say. You provide an equation and don't want to accept its solution value ?! By the way, $10^4$ is not a large number.
$endgroup$
– Yves Daoust
Jan 14 at 16:38












1 Answer
1






active

oldest

votes


















0












$begingroup$

After reduction the system is equivalent to



$$
frac{t_2}{alpha}+5ln beta =sum_{k=1}^5ln u_k\
alphaln beta -lnleft(sum_{k=1}^5 u_k^{alpha}right)=-ln t_1
$$



and after the ellimination of $ln beta$



$$
frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 = lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1
$$



calling



$$
f(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 -left( lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1right)
$$



at a solution $f(alpha)$ must cross the horizontal axis. Calculating the stationary points to $f(alpha)$ or $f'(alpha) = 0$ we can easily verify that $alpha = 0$ is the solution but $f(0) = -36.5837$ hence the former system doesn't have real solution.



Attached the plot for $f(alpha)$



enter image description here



Note the two asymptotes given by



$$
a_1(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(min (u_k)right)+ln t_1\
a_2(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(max (u_k)right)+ln t_1
$$






share|cite|improve this answer











$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3073243%2fnumerical-solution-to-a-system-of-equations%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0












    $begingroup$

    After reduction the system is equivalent to



    $$
    frac{t_2}{alpha}+5ln beta =sum_{k=1}^5ln u_k\
    alphaln beta -lnleft(sum_{k=1}^5 u_k^{alpha}right)=-ln t_1
    $$



    and after the ellimination of $ln beta$



    $$
    frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 = lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1
    $$



    calling



    $$
    f(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 -left( lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1right)
    $$



    at a solution $f(alpha)$ must cross the horizontal axis. Calculating the stationary points to $f(alpha)$ or $f'(alpha) = 0$ we can easily verify that $alpha = 0$ is the solution but $f(0) = -36.5837$ hence the former system doesn't have real solution.



    Attached the plot for $f(alpha)$



    enter image description here



    Note the two asymptotes given by



    $$
    a_1(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(min (u_k)right)+ln t_1\
    a_2(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(max (u_k)right)+ln t_1
    $$






    share|cite|improve this answer











    $endgroup$


















      0












      $begingroup$

      After reduction the system is equivalent to



      $$
      frac{t_2}{alpha}+5ln beta =sum_{k=1}^5ln u_k\
      alphaln beta -lnleft(sum_{k=1}^5 u_k^{alpha}right)=-ln t_1
      $$



      and after the ellimination of $ln beta$



      $$
      frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 = lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1
      $$



      calling



      $$
      f(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 -left( lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1right)
      $$



      at a solution $f(alpha)$ must cross the horizontal axis. Calculating the stationary points to $f(alpha)$ or $f'(alpha) = 0$ we can easily verify that $alpha = 0$ is the solution but $f(0) = -36.5837$ hence the former system doesn't have real solution.



      Attached the plot for $f(alpha)$



      enter image description here



      Note the two asymptotes given by



      $$
      a_1(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(min (u_k)right)+ln t_1\
      a_2(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(max (u_k)right)+ln t_1
      $$






      share|cite|improve this answer











      $endgroup$
















        0












        0








        0





        $begingroup$

        After reduction the system is equivalent to



        $$
        frac{t_2}{alpha}+5ln beta =sum_{k=1}^5ln u_k\
        alphaln beta -lnleft(sum_{k=1}^5 u_k^{alpha}right)=-ln t_1
        $$



        and after the ellimination of $ln beta$



        $$
        frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 = lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1
        $$



        calling



        $$
        f(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 -left( lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1right)
        $$



        at a solution $f(alpha)$ must cross the horizontal axis. Calculating the stationary points to $f(alpha)$ or $f'(alpha) = 0$ we can easily verify that $alpha = 0$ is the solution but $f(0) = -36.5837$ hence the former system doesn't have real solution.



        Attached the plot for $f(alpha)$



        enter image description here



        Note the two asymptotes given by



        $$
        a_1(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(min (u_k)right)+ln t_1\
        a_2(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(max (u_k)right)+ln t_1
        $$






        share|cite|improve this answer











        $endgroup$



        After reduction the system is equivalent to



        $$
        frac{t_2}{alpha}+5ln beta =sum_{k=1}^5ln u_k\
        alphaln beta -lnleft(sum_{k=1}^5 u_k^{alpha}right)=-ln t_1
        $$



        and after the ellimination of $ln beta$



        $$
        frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 = lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1
        $$



        calling



        $$
        f(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 -left( lnleft(sum_{k=1}^5 u_k^{alpha}right)-ln t_1right)
        $$



        at a solution $f(alpha)$ must cross the horizontal axis. Calculating the stationary points to $f(alpha)$ or $f'(alpha) = 0$ we can easily verify that $alpha = 0$ is the solution but $f(0) = -36.5837$ hence the former system doesn't have real solution.



        Attached the plot for $f(alpha)$



        enter image description here



        Note the two asymptotes given by



        $$
        a_1(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(min (u_k)right)+ln t_1\
        a_2(alpha) = frac {alpha}{5}sum_{k=1}^5ln u_k-t_2 - alphalnleft(max (u_k)right)+ln t_1
        $$







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Jan 15 at 13:31

























        answered Jan 14 at 19:45









        CesareoCesareo

        8,8643516




        8,8643516






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3073243%2fnumerical-solution-to-a-system-of-equations%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            'app-layout' is not a known element: how to share Component with different Modules

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            WPF add header to Image with URL pettitions [duplicate]