Gistlib Logo

gistlib

find the volume of the solid obtained by revolving the region bounded by the graph of f (x) = e^(−x), the x-axis, the y-axis, and the line x = 1 about the y-axis. in matlab

main.m
syms x;
f = exp(-x); % Define the function f(x) = e^(-x)
volume = pi * int(f^2, x, 0, 1); % Calculate the volume of revolution using the definite integral formula
volume
170 chars
5 lines

similar matlab code snippets

how to calculate the indefinite antiderivative of a function in matlab
how to calculate the definite antiderivative of a function in matlab
how to calculate the first derivative of a function in matlab
how to calculate the gradient of a function in matlab
how to calculate the integral of a function in matlab
how to calculate the laplacian of a function in matlab
how to calculate the third derivative of a function in matlab
how to calculate the second derivative of a function in matlab
how to calculate the antiderivative of a function in matlab
how to calculate the derivative of a function in matlab

related categories

matlab
calculus
volume-of-revolution

gistlibby LogSnag