[Tex/LaTex] plot the integral of sin(x^2) in pgfplots

pgfplots

i want to plot the integral of y=sin(x^2) in pgfplots but dont know what to put inside
the ''{ }''. This is because its a prety hard function to integrate. Can someone help me!

Best Answer

run with latex->dvips->ps2pdf:

\documentclass[pstricks]{standalone}
\usepackage{pst-func}
\begin{document}

\begin{pspicture}(-5,-3)(4.5,3)
\psaxes[ticksize=0 4pt, subticks=5](0,0)(-4.4,-2.5)(4,2.5)
\psplot[algebraic,plotpoints=5000,linecolor=red]{-4}{4}{sin(x*x)}
\psCumIntegral[plotpoints=10000,Simpson=10,linecolor=blue]{0}{4}{ dup mul RadtoDeg sin }
\psCumIntegral[plotpoints=10000,Simpson=10,linecolor=blue]{0}{-4}{ dup mul RadtoDeg sin }
\end{pspicture}

\end{document}

enter image description here

Related Question