0
$\begingroup$

This question already has an answer here:

How do I plot $\int \sin (\cos (x)) \, dx$ or any other indefinite integral that cannot be evaluated in terms of standard mathematical functions?

On the other hand Mathematica is able to plot this $\int_1^2 \sin (y \cos (x)) \, dx$ as a function of y:

Plot[\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(1\), \(2\)]\(Sin[
    y*Cos[x]] \[DifferentialD]x\)\), {y, 0, 10}]
$\endgroup$

marked as duplicate by J. M. will be back soon Mar 9 '18 at 12:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4
$\begingroup$

Plot needs expressions that can be evaluated to numerical values when replacing the plot variable by a numerical value. In order to plot a stem function (note that it is not uniquely defined), you can use NIntegrate as follows:

F = t \[Function] NIntegrate[Sin[Cos[x]], {x, 0, t}];
Plot[F[t], {t, 0, 20}]

enter image description here

$\endgroup$
2
$\begingroup$

To embellish upon Henrik's answer

f[t_?NumericQ] := NIntegrate[Sin[Cos[x]], {x, 0, t}]

Plot[f[t], {t, 0, 20}]

enter image description here

To find the min and max

#[{f[t], 0 < t < 7}, t] & /@ {NMinimize, NMaximize}

(* {{-0.893244, {t -> 4.71239}}, {0.893244, {t -> 1.5708}}} *)

Or

{t, f[t]} /. (FindRoot[f'[t], {t, #}] & /@ 
    Range[1.5, 17, 3]) // Column  

enter image description here

$\endgroup$

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