I have the following integral to evaluate numerically: $$x(t) = \frac{1}{f(t)}\int_0^{t_b} t^m (t + n)^o \sin(pt) \mathrm{d}t \quad m,n,o,p \in \mathbb{R}$$

x[t]== f[t]^-1 Integrate[t^m*(t + n)^o*Sin[p t], {t, 0, tb}]

$t_b, m, n, o,$ and $p$ are known constants. I'm quite confident that it is straightforward to employ NIntegrate to solve [and plot] x(t) if it lacks $\frac{1}{f(t)}$ but I'm unsure about how to go about evulating the above integral and then generating plots. Any advice on the same would be great help.


  • $\begingroup$ I don't see the problem... 1/f(t) is not inside the integral (?) $\endgroup$
    – Ivan
    Commented Sep 19, 2014 at 3:32
  • $\begingroup$ Yeah, that's my problem. $\endgroup$
    – gadha007
    Commented Sep 19, 2014 at 3:40
  • 1
    $\begingroup$ Well, if it's not inside the integral, you can just simply use NIntegrate[t^m*(t + n)^o*Sin[p t], {t, 0, tb}] and get a number. $\endgroup$
    – Ivan
    Commented Sep 19, 2014 at 4:01
  • 5
    $\begingroup$ This question shows how to numerically approximate an integral as a function of the end point. Do the answers to it solve your problem? It seems fundamentally the same question. $\endgroup$
    – Michael E2
    Commented Sep 19, 2014 at 12:36
  • 1
    $\begingroup$ @Michael E2 sorry. Yes. You're right. That's what the equation is. I'll check out the link you posted. Thanks. $\endgroup$
    – gadha007
    Commented Sep 19, 2014 at 18:02