0
$\begingroup$

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}]
$\endgroup$
5
  • $\begingroup$ but i know that mathematically derivative cancels out integration - this is not true in general. $\endgroup$ – flinty Jun 8 '20 at 12:35
  • $\begingroup$ @yarchik sorry , i thought there are editors on this site for correcting grammar or rephrasing my sentences. $\endgroup$ – Haneen Hussam Jun 8 '20 at 12:36
  • $\begingroup$ 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. $\endgroup$ – flinty Jun 8 '20 at 12:51
  • $\begingroup$ 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] $\endgroup$ – Bob Hanlon Jun 8 '20 at 12:56
  • $\begingroup$ @flinty I am not really sure what my teacher wants me to plot but i am assuming its the result i get after derivative. $\endgroup$ – Haneen Hussam Jun 8 '20 at 13:27
2
$\begingroup$

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}]
$\endgroup$
6
  • $\begingroup$ 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? $\endgroup$ – Haneen Hussam Jun 8 '20 at 12:40
  • $\begingroup$ @yarchik it's Sin[x t^2] not Sin[t^2]. $\endgroup$ – flinty Jun 8 '20 at 12:45
  • $\begingroup$ @flinty I guess, it was a mistake in the OP. $\endgroup$ – yarchik Jun 8 '20 at 12:49
  • 1
    $\begingroup$ @HaneenHussam That's already a different question. The post should normally contain only one, but I have counted already 5, albeit related questions. $\endgroup$ – yarchik Jun 8 '20 at 12:52
  • $\begingroup$ @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? $\endgroup$ – Haneen Hussam Jun 8 '20 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.