QuadGK Computation Question

Freya_the_Goddess
Sun, 15 Jan 2023 06:17:41 +0000
General Usage

Hi all,

I have tried QuadGK, but the result is not the same as the solution manual.

Is there a problem in between?

this is my code:

using SymPy, QuadGK

x = symbols("x")

f(x) = (x^6 + 2)/(8x^2)
# simplify(diff(f(x),x)
g(x) = sqrt(1 + (x^6 - 2)/(2x^3))

h(x) = f(x)*g(x)
Area(x) = 2pi*h(x)

d = quadgk(x -> Area(x), 1, 3, rtol=1e-10)
println("c = ", d)

9 posts - 3 participants