Weird behaviour of Plot

I tried to execute this simple command

Plot[Cosh[t] - Sinh[t] + Sin[t], {t, 0, 40}]


and this is the result I got

As you can see, there is an unexpected visual between $$t=30$$ and $$t=40$$. But when I used the identity $$e^{-t}=\cosh{t}-\sinh{t}$$, everything went fine. This command

Plot[Exp[-t] + Sin[t], {t, 0, 40}]


gives

What's going on here? Can anyone reproduce this result? Is this a bug? I'm using MMA 12 64bit on Windows 10.

• Try the MaxRecursion option for Plot. It is generally used to control adaptive sampling. – Lotus Feb 9 at 10:30
• Both $\cosh x$ and $\sinh x$ functions are diverging at large positive $x$ as $e^x$. For these values are hard to achieve perfect cancellation between the two functions. $e^{-x}$ does not have this problem. Use WorkingPrecision -> 30 option of Plot to get the same result. – yarchik Feb 9 at 10:57
• Plot[Cosh[t] - Sinh[t] + Sin[t], {t, 0, 40}, PlotPoints -> 4] this can partly solve it. – wuyudi Feb 9 at 15:35
• The same happens for me (v11 on Windows 10), WorkingPrecision -> 20 corrects it. – მამუკა ჯიბლაძე Feb 10 at 7:25

I think there is a problem with your main file. I tried your command and the result is ok. My Mma version is 12.