plot of a function containing integral

103 Views Asked by At

enter image description here

I have solved the problem. I want to see plot of $f(x)$ for different $n$. But I don't have any tool (software application) to do that. Can anyone please help! Thanks.

3

There are 3 best solutions below

1
On BEST ANSWER

An R solution:

f <- function(x, n) {
  u <- function(t) {(sin(t)/t)^n * cos(t*x)}
  integrate(u, 0, Inf, subdivisions = 2000)$value
}
f <- Vectorize(f)
curve(f(x, n = 2), from = -5, to = 5)

enter image description here

curve(f(x, n = 5), from = -6, to = 6)

enter image description here

2
On

This can be done in Matlab: see this. However, it requires certain knoweledge on programming it. Actually, Desmos accepts integral functions- and it is very easy to use. I don't know, however, if it accepts general improper integrals.

0
On

Here are plots for n=1,2,3 (more can be produced at your request, but they took a while to load). There were made on Mathematica 11 with the code (n was varied):

Plot[(1/Pi)*Integrate[(Sin[t]/t)^n*Cos[t*x], {t, 0, Infinity}], 
    {x, -1, 1},PlotRange -> {0, 1}
    ]

n=1:

enter image description here

n=2:

enter image description here

n=3:

enter image description here