How to find the inverse of a function numerically












0












$begingroup$


This is an extension of my previous question posted in here Inverse of a function of a 3rd order



Now, I have another one which seems to be more complicated. I don't know how to solve them numerically. The function is as follow



$$z(zeta)=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$



in which $z$ is a complex number and cannot be zero. $m_k$, $a$ and $b$ are constant.



How to solve this function for $zeta(z)$?
I am a Matlab user so I would appreciate if someone can refer to any built-in Matlab function that can be used.



Example



The following $z(zeta)$ is obtained using the following input:
$$a=-2.08$$
$$b = 4.08$$
$$m_1 = 0.5$$
$$m_2 = -0.03$$
$$zeta = costheta+isintheta$$ for $theta = [0,2pi]$



for
The results is:



z = [
2.9400 + 0.0000i
3.2277 + 2.1618i
2.2730 + 1.2986i
0.4557 - 2.2605i
-1.4094 - 6.6606i
-2.3950 - 9.7020i
-1.9857 -10.1025i
-0.4083 - 7.8642i
1.5321 - 3.9596i
2.9400 - 0.0000i
]



Thanks!










share|cite|improve this question











$endgroup$












  • $begingroup$
    It can be that there is no algebraic expression for the inverse. Does it suffice to have an algorithm that finds the input value, when given the output value $z$?
    $endgroup$
    – Matti P.
    Jan 28 at 11:52










  • $begingroup$
    Hi @MattiP. Yes. The input $zeta = e^{i theta}$ where $theta$ is from $0$ to $2pi$
    $endgroup$
    – BeeTiau
    Jan 28 at 12:04
















0












$begingroup$


This is an extension of my previous question posted in here Inverse of a function of a 3rd order



Now, I have another one which seems to be more complicated. I don't know how to solve them numerically. The function is as follow



$$z(zeta)=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$



in which $z$ is a complex number and cannot be zero. $m_k$, $a$ and $b$ are constant.



How to solve this function for $zeta(z)$?
I am a Matlab user so I would appreciate if someone can refer to any built-in Matlab function that can be used.



Example



The following $z(zeta)$ is obtained using the following input:
$$a=-2.08$$
$$b = 4.08$$
$$m_1 = 0.5$$
$$m_2 = -0.03$$
$$zeta = costheta+isintheta$$ for $theta = [0,2pi]$



for
The results is:



z = [
2.9400 + 0.0000i
3.2277 + 2.1618i
2.2730 + 1.2986i
0.4557 - 2.2605i
-1.4094 - 6.6606i
-2.3950 - 9.7020i
-1.9857 -10.1025i
-0.4083 - 7.8642i
1.5321 - 3.9596i
2.9400 - 0.0000i
]



Thanks!










share|cite|improve this question











$endgroup$












  • $begingroup$
    It can be that there is no algebraic expression for the inverse. Does it suffice to have an algorithm that finds the input value, when given the output value $z$?
    $endgroup$
    – Matti P.
    Jan 28 at 11:52










  • $begingroup$
    Hi @MattiP. Yes. The input $zeta = e^{i theta}$ where $theta$ is from $0$ to $2pi$
    $endgroup$
    – BeeTiau
    Jan 28 at 12:04














0












0








0





$begingroup$


This is an extension of my previous question posted in here Inverse of a function of a 3rd order



Now, I have another one which seems to be more complicated. I don't know how to solve them numerically. The function is as follow



$$z(zeta)=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$



in which $z$ is a complex number and cannot be zero. $m_k$, $a$ and $b$ are constant.



How to solve this function for $zeta(z)$?
I am a Matlab user so I would appreciate if someone can refer to any built-in Matlab function that can be used.



Example



The following $z(zeta)$ is obtained using the following input:
$$a=-2.08$$
$$b = 4.08$$
$$m_1 = 0.5$$
$$m_2 = -0.03$$
$$zeta = costheta+isintheta$$ for $theta = [0,2pi]$



for
The results is:



z = [
2.9400 + 0.0000i
3.2277 + 2.1618i
2.2730 + 1.2986i
0.4557 - 2.2605i
-1.4094 - 6.6606i
-2.3950 - 9.7020i
-1.9857 -10.1025i
-0.4083 - 7.8642i
1.5321 - 3.9596i
2.9400 - 0.0000i
]



Thanks!










share|cite|improve this question











$endgroup$




This is an extension of my previous question posted in here Inverse of a function of a 3rd order



Now, I have another one which seems to be more complicated. I don't know how to solve them numerically. The function is as follow



$$z(zeta)=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$



in which $z$ is a complex number and cannot be zero. $m_k$, $a$ and $b$ are constant.



How to solve this function for $zeta(z)$?
I am a Matlab user so I would appreciate if someone can refer to any built-in Matlab function that can be used.



Example



The following $z(zeta)$ is obtained using the following input:
$$a=-2.08$$
$$b = 4.08$$
$$m_1 = 0.5$$
$$m_2 = -0.03$$
$$zeta = costheta+isintheta$$ for $theta = [0,2pi]$



for
The results is:



z = [
2.9400 + 0.0000i
3.2277 + 2.1618i
2.2730 + 1.2986i
0.4557 - 2.2605i
-1.4094 - 6.6606i
-2.3950 - 9.7020i
-1.9857 -10.1025i
-0.4083 - 7.8642i
1.5321 - 3.9596i
2.9400 - 0.0000i
]



Thanks!







numerical-methods inverse-function






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 28 at 12:19







BeeTiau

















asked Jan 28 at 11:26









BeeTiauBeeTiau

758




758












  • $begingroup$
    It can be that there is no algebraic expression for the inverse. Does it suffice to have an algorithm that finds the input value, when given the output value $z$?
    $endgroup$
    – Matti P.
    Jan 28 at 11:52










  • $begingroup$
    Hi @MattiP. Yes. The input $zeta = e^{i theta}$ where $theta$ is from $0$ to $2pi$
    $endgroup$
    – BeeTiau
    Jan 28 at 12:04


















  • $begingroup$
    It can be that there is no algebraic expression for the inverse. Does it suffice to have an algorithm that finds the input value, when given the output value $z$?
    $endgroup$
    – Matti P.
    Jan 28 at 11:52










  • $begingroup$
    Hi @MattiP. Yes. The input $zeta = e^{i theta}$ where $theta$ is from $0$ to $2pi$
    $endgroup$
    – BeeTiau
    Jan 28 at 12:04
















$begingroup$
It can be that there is no algebraic expression for the inverse. Does it suffice to have an algorithm that finds the input value, when given the output value $z$?
$endgroup$
– Matti P.
Jan 28 at 11:52




$begingroup$
It can be that there is no algebraic expression for the inverse. Does it suffice to have an algorithm that finds the input value, when given the output value $z$?
$endgroup$
– Matti P.
Jan 28 at 11:52












$begingroup$
Hi @MattiP. Yes. The input $zeta = e^{i theta}$ where $theta$ is from $0$ to $2pi$
$endgroup$
– BeeTiau
Jan 28 at 12:04




$begingroup$
Hi @MattiP. Yes. The input $zeta = e^{i theta}$ where $theta$ is from $0$ to $2pi$
$endgroup$
– BeeTiau
Jan 28 at 12:04










1 Answer
1






active

oldest

votes


















1












$begingroup$

Scale your equation
$$z=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$
by $zeta^2$ and obtain the equivalent form
$$z zeta^2=aleft(zeta+m_1zeta^3+m_2zeta^4 right)+bleft(zeta^3+m_1zeta+m_2 right),$$
which can be reordered into
$$ 0 = am_2 zeta^4+(am_1+b)zeta^3-zzeta^2+(bm_1+a)zeta+bm_2.$$
The right-hand side is a polynomial in $zeta$ of order at most $4$. MATLAB has a built-in function called roots which will compute all the roots of a polynomial by finding the eigenvalues of the companion matrix.






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%2f3090737%2fhow-to-find-the-inverse-of-a-function-numerically%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









    1












    $begingroup$

    Scale your equation
    $$z=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$
    by $zeta^2$ and obtain the equivalent form
    $$z zeta^2=aleft(zeta+m_1zeta^3+m_2zeta^4 right)+bleft(zeta^3+m_1zeta+m_2 right),$$
    which can be reordered into
    $$ 0 = am_2 zeta^4+(am_1+b)zeta^3-zzeta^2+(bm_1+a)zeta+bm_2.$$
    The right-hand side is a polynomial in $zeta$ of order at most $4$. MATLAB has a built-in function called roots which will compute all the roots of a polynomial by finding the eigenvalues of the companion matrix.






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      Scale your equation
      $$z=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$
      by $zeta^2$ and obtain the equivalent form
      $$z zeta^2=aleft(zeta+m_1zeta^3+m_2zeta^4 right)+bleft(zeta^3+m_1zeta+m_2 right),$$
      which can be reordered into
      $$ 0 = am_2 zeta^4+(am_1+b)zeta^3-zzeta^2+(bm_1+a)zeta+bm_2.$$
      The right-hand side is a polynomial in $zeta$ of order at most $4$. MATLAB has a built-in function called roots which will compute all the roots of a polynomial by finding the eigenvalues of the companion matrix.






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        Scale your equation
        $$z=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$
        by $zeta^2$ and obtain the equivalent form
        $$z zeta^2=aleft(zeta+m_1zeta^3+m_2zeta^4 right)+bleft(zeta^3+m_1zeta+m_2 right),$$
        which can be reordered into
        $$ 0 = am_2 zeta^4+(am_1+b)zeta^3-zzeta^2+(bm_1+a)zeta+bm_2.$$
        The right-hand side is a polynomial in $zeta$ of order at most $4$. MATLAB has a built-in function called roots which will compute all the roots of a polynomial by finding the eigenvalues of the companion matrix.






        share|cite|improve this answer









        $endgroup$



        Scale your equation
        $$z=aleft(frac{1}{zeta}+m_1zeta+m_2zeta^2 right)+bleft(zeta+frac{m_1}{zeta}+frac{m_2}{zeta^2} right)$$
        by $zeta^2$ and obtain the equivalent form
        $$z zeta^2=aleft(zeta+m_1zeta^3+m_2zeta^4 right)+bleft(zeta^3+m_1zeta+m_2 right),$$
        which can be reordered into
        $$ 0 = am_2 zeta^4+(am_1+b)zeta^3-zzeta^2+(bm_1+a)zeta+bm_2.$$
        The right-hand side is a polynomial in $zeta$ of order at most $4$. MATLAB has a built-in function called roots which will compute all the roots of a polynomial by finding the eigenvalues of the companion matrix.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 28 at 21:09









        Carl ChristianCarl Christian

        5,9161723




        5,9161723






























            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%2f3090737%2fhow-to-find-the-inverse-of-a-function-numerically%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

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith