1
$\begingroup$

Does anybody know the problem?

why is the plot hatched ? I just want a simple plot.

g[z_, t_] := 1 + t*z + z^3

Plot[Residue[1/(1 + t*z + z^3), {z, Root[Function[z, g[z, t]], 1]}], {t, 0, 10}]

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ Please show us the code text as you've done in your first question, rather than posting a screenshot. $\endgroup$
    – xzczd
    Mar 17, 2020 at 8:56
  • $\begingroup$ @Dear xzczd, my original problem is about polynomials of degree 4 which coefficient are functions of temperature as like as screenshot which have mentioned above. I want to plot T-dependence of roots and residue of them. sorry for posting many screenshots $\endgroup$
    – Arian
    Mar 17, 2020 at 9:15
  • $\begingroup$ I mean, please post the code text instead of the screenshot. Currently we'll have to transcribe the code from your screenshot if we want to test it. $\endgroup$
    – xzczd
    Mar 17, 2020 at 9:24
  • $\begingroup$ @xzczd thank you so much, yes, you are right, I should have sent code instead of it's screenshoot $\endgroup$
    – Arian
    Mar 17, 2020 at 9:39
  • $\begingroup$ -1×2, will retract my downvotes as soon as the code text are added to the questions. $\endgroup$
    – xzczd
    Mar 17, 2020 at 9:58

1 Answer 1

1
$\begingroup$

Root cann't handel the additional parameter t! Try

g[z_, t_] := 1 + t z + z^3
root[t_] := Root[Function[z, g[z, t]], 1]  
Plot[Evaluate[Residue[1/g[z, t], {z, root[t]  }]], {t, 0, 10} ]

enter image description here

$\endgroup$
9
  • $\begingroup$ @Dear Ulrich Neumann, thank you so much, it was very clear. $\endgroup$
    – Arian
    Mar 17, 2020 at 9:42
  • $\begingroup$ @Arian You're welcome! $\endgroup$ Mar 17, 2020 at 9:43
  • $\begingroup$ The solution works, but the explanation is incorrect. This is a matter of precision. Try Plot[Residue[1/g[z, t], {z, Root[Function[z, g[z, t]], 1] }], {t, 0, 10},WorkingPrecision->16 ]. $\endgroup$
    – xzczd
    Mar 17, 2020 at 10:06
  • $\begingroup$ @xzcd Thanks for your clarification. Nevertheless in my opinion a numerical solution which doesn't need high workingprecision is quite reliable. $\endgroup$ Mar 17, 2020 at 10:40
  • $\begingroup$ That's true, your solution is the better choice for resolving the problem. $\endgroup$
    – xzczd
    Mar 17, 2020 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.