Panjang Garing Lengkung dan Luas Benda Putar


24/01/2020 03:57:32 264 Web

Panjang Garis Lengkung

$panjang = \int_{a}^{b} \sqrt{1+(\frac{dy}{dx})^2} dx$

from sympy import Symbol
from matplotlib import pyplot
import numpy
x = Symbol('x')
y = x**2
y

$\displaystyle x^{2}$

dy = y.diff(x)
dy

$\displaystyle 2 x$

p = (1 + dy**2)**(1/2)
p_integral = p.integrate(x)
p_integral.evalf(subs={x:10})

$\displaystyle 101.047297939751$

125 ** (1/2)
11.180339887498949

Luas Permukaan Benda Putar

$luas = 2\pi\int_{a}^{b} y\sqrt{1+(\frac{dy}{dx})^2} dx$

luas = 2 * 22/7 * (y * p).integrate(x)
luas

$\displaystyle 2.09523809523809 x^{3} {{}{2}F{1}\left(\begin{matrix} -0.5, \frac{3}{2} \ \frac{5}{2} \end{matrix}\middle| {4 x^{2} e^{i \pi}} \right)}$

luas.evalf(subs={x:5})

$\displaystyle 1983.65865652259$