# how to derive and plot the FresnelS function

I am given an $$g(x)= \int_{x}^{x^3} \sin(x t^2) dt$$. The definition is clear g[x] is an integral of function Sin from x to x^3 .I am asked to find its derivative and plot the FresnelS function over [-10,10]. Now when I use D command for g[x], it gives result after evaluating the integral, which is a FresnelS function, but i know that mathematically derivative cancels out integration and gives the functions as it is. That's if I am not wrong? how can I differentiate g[x] ? And if the result is a FresnelS function? Because my teacher asks in the same question to plot the FresnelS function, should I plot the result or the given integral g[x]? i did try to plot both but I think my result is all wrong. I don't get it.

g[x_] = Hold[Integrate[Sin[x*t^2], {t, x, x^3}]]
a=ReleaseHold[%]
D[a,x]
Plot[(Sqrt[π/2] (-FresnelS[Sqrt[2/π] x^(3/2)] +
FresnelS[Sqrt[2/π] x^(7/2)]))/Sqrt[x], {x, -10, 10}]

• but i know that mathematically derivative cancels out integration - this is not true in general. – flinty Jun 8 '20 at 12:35
• @yarchik sorry , i thought there are editors on this site for correcting grammar or rephrasing my sentences. – Haneen Hussam Jun 8 '20 at 12:36
• The result of Integrate[Sin[x*t^2],{t,x,x^3}] is not a single FresnelS function. If you want to plot FresnelS just do Plot[FresnelS[t],{t,-10,10}]. If you want to plot the derivative of g[x] just do g[x_] = Integrate[Sin[x*t^2], {t, x, x^3}] and Plot[g'[x],{x,-10,10}]. The quote ' after g indicates the derivative. – flinty Jun 8 '20 at 12:51
• Note that as shown in the documentation, the definition for FresnelS used in Mathematica is Integrate[Sin[Pi t^2/2], {t, 0, x}]. Then its derivative FresnelS'[x] is Sin[(Pi*x^2)/2] – Bob Hanlon Jun 8 '20 at 12:56
• @flinty I am not really sure what my teacher wants me to plot but i am assuming its the result i get after derivative. – Haneen Hussam Jun 8 '20 at 13:27

Try this

f[x_] = Integrate[Sin[t^2], {t, x, x^3}]
D[f[x], x]
h[x_] = Exp[-x]
Plot[{f[x], h[x]}, {x, -2, 2}]
FindRoot[f[x] == h[x], {x, 0}]

• And if I needed to find x values where f[x] is equal to another function h[x]=e^-x in mathematica. Using Solve[e^-x= f[x],x] doesn't give any result. Is there any other command i can use to find values of x where the two functions intersect with? – Haneen Hussam Jun 8 '20 at 12:40
• @yarchik it's Sin[x t^2] not Sin[t^2]. – flinty Jun 8 '20 at 12:45
• @flinty I guess, it was a mistake in the OP. – yarchik Jun 8 '20 at 12:49
• @HaneenHussam That's already a different question. The post should normally contain only one, but I have counted already 5, albeit related questions. – yarchik Jun 8 '20 at 12:52
• @yarchik Well that's when I solve it mathematically, i get 5 points It's definitely obvious when you plot them together.But using the program, I was wondering If there is a special command to find them directly for the functions above. Or do i need to post a question about this separately? – Haneen Hussam Jun 8 '20 at 13:25