Setting y axis limit in a function plot

Hi, when I try to plot two functions on the same graph, why is the y-axis limit not adjusting automatically? If you look at the macro I have attached here, a portion of the function in the negative y-axis is cut off. And the two lines I have in the code to set y-axis limits are not working. How do I fix this?
Thank you.

Please read tips for efficient and successful posting and posting code

_ROOT Version: 5.34/38ylim.cpp (393 Bytes)
Platform: Ubuntu
Compiler: Not Provided

f1->GetYaxis()->SetRangeUser(-5., 5.);

Thank you very much.