How to plot the graph of $[|\sin x|+|\cos x|]$ where [.] is the G.I.F?

1.8k Views Asked by At

I was solving an integral $$\int_{0}^{2\pi}[|\sin x|+|\cos x|]dx$$ and wondered whether i can do the same using graph of the function $$f(x)=[|\sin x|+|\cos x|]$$ where $[.]$ denotes greatest integer function and | | is the mod function.When i did the same using an online graphing calculator all i landed up with was this- $$|\sin x|+|\cos x| \implies$$

$|\sin x|+|\cos x|$

$$[|sinx|+|cosx|] \implies$$

$[|sinx|+|cosx|]$

Can anyone plz help me out by providing a step by step guide for plotting the same by hand.I dont have any idea on how to do the same.Any solution would be apreciated.