Overlay of two functions leaves gapsCannot Plot FunctionStability analysis of transcendental equation (stability crossing curves)Implicitly defined compact complicated surfaceHow to invert an Elliptic function where the elliptic nome is a function of an independent variable?Visualizing the primes with the Riemann Zeta functionGroup delay of a transfer functionHow would one go about plotting this parameterized curve using numerical resources (analitically it's too hard)?How to study the behavior of this series in Mathematica?What am I doing wrong when trying to plot this function?ComplexPlot3D and essential singularities

How would 10 generations of living underground change the human body?

How to limit Drive Letters Windows assigns to new removable USB drives

Was there a shared-world project before "Thieves World"?

What's the polite way to say "I need to urinate"?

If a planet has 3 moons, is it possible to have triple Full/New Moons at once?

Minor Revision with suggestion of an alternative proof by reviewer

Like totally amazing interchangeable sister outfits II: The Revenge

Can I criticise the more senior developers around me for not writing clean code?

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

How to pronounce 'c++' in Spanish

Why does Mind Blank stop the Feeblemind spell?

Coordinate my way to the name of the (video) game

How to denote matrix elements succinctly?

What term is being referred to with "reflected-sound-of-underground-spirits"?

Checks user level and limit the data before saving it to mongoDB

Don’t seats that recline flat defeat the purpose of having seatbelts?

"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?

What happened to Captain America in Endgame?

Pre-plastic human skin alternative

Function pointer with named arguments?

Elements that can bond to themselves?

"The cow" OR "a cow" OR "cows" in this context

Is the claim "Employers won't employ people with no 'social media presence'" realistic?

Check if a string is entirely made of the same substring



Overlay of two functions leaves gaps


Cannot Plot FunctionStability analysis of transcendental equation (stability crossing curves)Implicitly defined compact complicated surfaceHow to invert an Elliptic function where the elliptic nome is a function of an independent variable?Visualizing the primes with the Riemann Zeta functionGroup delay of a transfer functionHow would one go about plotting this parameterized curve using numerical resources (analitically it's too hard)?How to study the behavior of this series in Mathematica?What am I doing wrong when trying to plot this function?ComplexPlot3D and essential singularities













1












$begingroup$


I have a function defined as:



$rho_mleft(epsilon,mright)=left[-2epsilon rpmleft(4epsilon^2r^2+mlambda r^3right)^frac12right]^frac12$



I want to plot it for some $min mathbbZ$, so I wrote this code:



Clear[r,[Lambda]];
[Lambda]=685*10^-9;
r=25*10^-3;
[Rho]1[[Epsilon]_,m_]=(-2*[Epsilon]*r+(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
[Rho]2[[Epsilon]_,m_]=(-2*[Epsilon]*r-(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
M=Range[-5,5,1];
p1=Show[Plot[[Rho]1[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
p2=Show[Plot[[Rho]2[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
Show[p1,p2]


Which outputs:



enter image description here



However, there are some tiny gaps where the two functiosn meet, but I was expecting them to be continuous. How can I fix that?










share|improve this question









$endgroup$











  • $begingroup$
    Adding the option PlotPoints->1000 to both your Plots will make those gaps much less visible.
    $endgroup$
    – Bill
    1 hour ago










  • $begingroup$
    I think that the problem may be that the functions become imaginary at $epsilon = 0$. Plot doesn't plot anything at all when the value is imaginary. When it happens precisely at the point where they're supposed to meet I guess it becomes a numerical issue, hence why PlotPoints may help.
    $endgroup$
    – C. E.
    43 mins ago















1












$begingroup$


I have a function defined as:



$rho_mleft(epsilon,mright)=left[-2epsilon rpmleft(4epsilon^2r^2+mlambda r^3right)^frac12right]^frac12$



I want to plot it for some $min mathbbZ$, so I wrote this code:



Clear[r,[Lambda]];
[Lambda]=685*10^-9;
r=25*10^-3;
[Rho]1[[Epsilon]_,m_]=(-2*[Epsilon]*r+(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
[Rho]2[[Epsilon]_,m_]=(-2*[Epsilon]*r-(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
M=Range[-5,5,1];
p1=Show[Plot[[Rho]1[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
p2=Show[Plot[[Rho]2[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
Show[p1,p2]


Which outputs:



enter image description here



However, there are some tiny gaps where the two functiosn meet, but I was expecting them to be continuous. How can I fix that?










share|improve this question









$endgroup$











  • $begingroup$
    Adding the option PlotPoints->1000 to both your Plots will make those gaps much less visible.
    $endgroup$
    – Bill
    1 hour ago










  • $begingroup$
    I think that the problem may be that the functions become imaginary at $epsilon = 0$. Plot doesn't plot anything at all when the value is imaginary. When it happens precisely at the point where they're supposed to meet I guess it becomes a numerical issue, hence why PlotPoints may help.
    $endgroup$
    – C. E.
    43 mins ago













1












1








1





$begingroup$


I have a function defined as:



$rho_mleft(epsilon,mright)=left[-2epsilon rpmleft(4epsilon^2r^2+mlambda r^3right)^frac12right]^frac12$



I want to plot it for some $min mathbbZ$, so I wrote this code:



Clear[r,[Lambda]];
[Lambda]=685*10^-9;
r=25*10^-3;
[Rho]1[[Epsilon]_,m_]=(-2*[Epsilon]*r+(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
[Rho]2[[Epsilon]_,m_]=(-2*[Epsilon]*r-(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
M=Range[-5,5,1];
p1=Show[Plot[[Rho]1[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
p2=Show[Plot[[Rho]2[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
Show[p1,p2]


Which outputs:



enter image description here



However, there are some tiny gaps where the two functiosn meet, but I was expecting them to be continuous. How can I fix that?










share|improve this question









$endgroup$




I have a function defined as:



$rho_mleft(epsilon,mright)=left[-2epsilon rpmleft(4epsilon^2r^2+mlambda r^3right)^frac12right]^frac12$



I want to plot it for some $min mathbbZ$, so I wrote this code:



Clear[r,[Lambda]];
[Lambda]=685*10^-9;
r=25*10^-3;
[Rho]1[[Epsilon]_,m_]=(-2*[Epsilon]*r+(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
[Rho]2[[Epsilon]_,m_]=(-2*[Epsilon]*r-(4*[Epsilon]^2*r^2+m*[Lambda]*r^3)^(1/2))^(1/2);
M=Range[-5,5,1];
p1=Show[Plot[[Rho]1[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
p2=Show[Plot[[Rho]2[[Epsilon]*10^-3,#]*10^3, [Epsilon],-0.5,0.5, PlotRange -> -0.5,0.5,0, 5,AxesOrigin->-0.5,0,PlotTheme->"Monochrome"] & /@ M];
Show[p1,p2]


Which outputs:



enter image description here



However, there are some tiny gaps where the two functiosn meet, but I was expecting them to be continuous. How can I fix that?







plotting graphics






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









RodrigoRodrigo

986




986











  • $begingroup$
    Adding the option PlotPoints->1000 to both your Plots will make those gaps much less visible.
    $endgroup$
    – Bill
    1 hour ago










  • $begingroup$
    I think that the problem may be that the functions become imaginary at $epsilon = 0$. Plot doesn't plot anything at all when the value is imaginary. When it happens precisely at the point where they're supposed to meet I guess it becomes a numerical issue, hence why PlotPoints may help.
    $endgroup$
    – C. E.
    43 mins ago
















  • $begingroup$
    Adding the option PlotPoints->1000 to both your Plots will make those gaps much less visible.
    $endgroup$
    – Bill
    1 hour ago










  • $begingroup$
    I think that the problem may be that the functions become imaginary at $epsilon = 0$. Plot doesn't plot anything at all when the value is imaginary. When it happens precisely at the point where they're supposed to meet I guess it becomes a numerical issue, hence why PlotPoints may help.
    $endgroup$
    – C. E.
    43 mins ago















$begingroup$
Adding the option PlotPoints->1000 to both your Plots will make those gaps much less visible.
$endgroup$
– Bill
1 hour ago




$begingroup$
Adding the option PlotPoints->1000 to both your Plots will make those gaps much less visible.
$endgroup$
– Bill
1 hour ago












$begingroup$
I think that the problem may be that the functions become imaginary at $epsilon = 0$. Plot doesn't plot anything at all when the value is imaginary. When it happens precisely at the point where they're supposed to meet I guess it becomes a numerical issue, hence why PlotPoints may help.
$endgroup$
– C. E.
43 mins ago




$begingroup$
I think that the problem may be that the functions become imaginary at $epsilon = 0$. Plot doesn't plot anything at all when the value is imaginary. When it happens precisely at the point where they're supposed to meet I guess it becomes a numerical issue, hence why PlotPoints may help.
$endgroup$
– C. E.
43 mins ago










1 Answer
1






active

oldest

votes


















3












$begingroup$

If you turn the equation around and plot $epsilon$ as a function of $rho$, then there are no gaps and no branches:



λ = 685*10^-9;
r = 25*10^-3;
ParametricPlot[Table[10^3 (m r^3 λ - ρ^4)/(4 r ρ^2), ρ, m, -5, 5],
ρ, 0, 5*10^-3, AspectRatio -> 1/GoldenRatio]


enter image description here






share|improve this answer









$endgroup$













    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "387"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f197133%2foverlay-of-two-functions-leaves-gaps%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









    3












    $begingroup$

    If you turn the equation around and plot $epsilon$ as a function of $rho$, then there are no gaps and no branches:



    λ = 685*10^-9;
    r = 25*10^-3;
    ParametricPlot[Table[10^3 (m r^3 λ - ρ^4)/(4 r ρ^2), ρ, m, -5, 5],
    ρ, 0, 5*10^-3, AspectRatio -> 1/GoldenRatio]


    enter image description here






    share|improve this answer









    $endgroup$

















      3












      $begingroup$

      If you turn the equation around and plot $epsilon$ as a function of $rho$, then there are no gaps and no branches:



      λ = 685*10^-9;
      r = 25*10^-3;
      ParametricPlot[Table[10^3 (m r^3 λ - ρ^4)/(4 r ρ^2), ρ, m, -5, 5],
      ρ, 0, 5*10^-3, AspectRatio -> 1/GoldenRatio]


      enter image description here






      share|improve this answer









      $endgroup$















        3












        3








        3





        $begingroup$

        If you turn the equation around and plot $epsilon$ as a function of $rho$, then there are no gaps and no branches:



        λ = 685*10^-9;
        r = 25*10^-3;
        ParametricPlot[Table[10^3 (m r^3 λ - ρ^4)/(4 r ρ^2), ρ, m, -5, 5],
        ρ, 0, 5*10^-3, AspectRatio -> 1/GoldenRatio]


        enter image description here






        share|improve this answer









        $endgroup$



        If you turn the equation around and plot $epsilon$ as a function of $rho$, then there are no gaps and no branches:



        λ = 685*10^-9;
        r = 25*10^-3;
        ParametricPlot[Table[10^3 (m r^3 λ - ρ^4)/(4 r ρ^2), ρ, m, -5, 5],
        ρ, 0, 5*10^-3, AspectRatio -> 1/GoldenRatio]


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 48 mins ago









        RomanRoman

        6,21611132




        6,21611132



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Mathematica 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%2fmathematica.stackexchange.com%2fquestions%2f197133%2foverlay-of-two-functions-leaves-gaps%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

            Era Viking Índice Início da Era Viquingue | Cotidiano | Sociedade | Língua | Religião | A arte | As primeiras cidades | As viagens dos viquingues | Viquingues do Oeste e Leste | Fim da Era Viquingue | Fontes históricas | Referências Bibliografia | Ligações externas | Menu de navegação«Sverige då!»«Handel I vikingetid»«O que é Nórdico Antigo»Mito, magia e religião na volsunga saga Um olhar sobre a trajetória mítica do herói sigurd«Bonden var den verklige vikingen»«Vikingatiden»«Vikingatiden»«Vinland»«Guerreiras de Óðinn: As Valkyrjor na Mitologia Viking»1519-9053«Esculpindo símbolos e seres: A arte viking em pedras rúnicas»1679-9313Historia - Tema: VikingarnaAventura e Magia no Mundo das Sagas IslandesasEra Vikinge

            What's the metal clinking sound at the end of credits in Avengers: Endgame?What makes Thanos so strong in Avengers: Endgame?Who is the character that appears at the end of Endgame?What happens to Mjolnir (Thor's hammer) at the end of Endgame?The People's Ages in Avengers: EndgameWhat did Nebula do in Avengers: Endgame?Messing with time in the Avengers: Endgame climaxAvengers: Endgame timelineWhat are the time-travel rules in Avengers Endgame?Why use this song in Avengers: Endgame Opening Logo Sequence?Peggy's age in Avengers Endgame

            Are there legal definitions of ethnicities/races? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Legal definitions in the United StatesAre there truly legal limits on US interest rates?Are gender identity and sexual orientation federally protected?Why is there an apparent legal bias against digital services?What limits are there to the powers of individual judges in the United States legal system?Are women only scholarships legal under Irish / EU law?Is the term “race” defined by Public Law enacted by Congress of the United StatesIs there a legal definition of race in the US?Neighbors are spying for landlord on Renters is it legal?Are Protected Classes Bi-directional?