Gabriel's horn-matlab help asap

  • MATLAB
  • Thread starter dhooks
  • Start date
In summary, to plot the volume and surface area of Gabriel's horn in MATLAB, you will need to define the equations using integrals, create a vector of x values, calculate the volume and surface area for each x value, and plot the results using the "plot" function.
  • #1
dhooks
1
0
i need help asap if anyone can spare some time.

here is the problem

i am learning MATLAB and i have to graph volume and surface area of Gabriel's horn. i solved the eqn for the answer i just don't know how to input the information for the graph to plot properly. if you google gabriels horn you can see volume and surface area worked out. what do i write to plot it? I've been looking how to revolve the eqn around the x-axis i haven't been to successful.

Gabriels horn is:

1/x from x=1 to x=infinity.
 
Last edited:
Physics news on Phys.org
  • #2


Hi there,

I can definitely help you with this problem. First, let's start by defining the equation for the volume and surface area of Gabriel's horn. The volume can be represented by the integral of the function 1/x from x=1 to x=infinity. This can be written as V = π∫(1/x)^2 dx. Similarly, the surface area can be represented by the integral of the function 2πx(1/x) from x=1 to x=infinity. This can be written as A = 2π∫1/x dx.

Now, to plot these functions in MATLAB, you will first need to create a vector of x values. This can be done using the "linspace" function, which will create a vector with evenly spaced values between two specified points. In this case, we want our x values to range from 1 to infinity, so we can use a very large number for the upper limit, such as 1000.

Next, you will need to calculate the volume and surface area for each x value using the equations we defined earlier. This can be done using a "for" loop or by using the element-wise operators in MATLAB. For example, for the volume, you can use the command V = pi.*(1./x).^2, where "pi" is the constant and "x" is your vector of x values.

Once you have calculated the volume and surface area for each x value, you can plot them using the "plot" function in MATLAB. Simply enter your x values as the first argument and the corresponding volume or surface area values as the second argument.

I hope this helps you to plot the graph of volume and surface area for Gabriel's horn in MATLAB. Good luck with your project!
 
  • #3


Hello Gabriel,

Thank you for reaching out for help with your MATLAB problem. I understand that you are trying to graph the volume and surface area of Gabriel's horn and are having trouble inputting the information correctly.

To plot the volume and surface area of Gabriel's horn, you will need to use the "plot" function in MATLAB. This function takes in two vectors, one for the x-axis values and one for the y-axis values. In this case, your x-axis values will be the values of x from 1 to infinity, and your y-axis values will be the corresponding volume and surface area values calculated using the equation 1/x.

To plot the volume, you can use the following code:

x = 1:100; % generate a vector of x values from 1 to 100
volume = 1./x; % calculate the volume values using the equation 1/x
plot(x, volume); % plot the volume values against the x values

To plot the surface area, you can use the following code:

x = 1:100; % generate a vector of x values from 1 to 100
surface_area = 2*pi./x; % calculate the surface area values using the equation 2*pi/x
plot(x, surface_area); % plot the surface area values against the x values

Note that I have used a range of x values from 1 to 100 for demonstration purposes, but you can use a larger range to get a more accurate graph. You can also change the values in the "x = 1:100" line to adjust the range of x values.

I hope this helps you plot Gabriel's horn correctly. Remember to always check the syntax and parameters of the functions you are using to ensure accurate results. Good luck with your MATLAB journey!
 

1. What is Gabriel's horn in mathematics?

Gabriel's horn, also known as Torricelli's trumpet, is a mathematical shape that has infinite surface area but finite volume. It is formed by rotating the curve y=1/x around the x-axis.

2. How is Gabriel's horn related to calculus?

Gabriel's horn is a classic example of a surface of revolution, which is often used in calculus to demonstrate concepts such as surface area and volume. Its properties also have implications for the concept of infinity in mathematics.

3. What is the significance of Gabriel's horn?

Gabriel's horn is an interesting mathematical shape that challenges our intuitions about the relationship between surface area and volume. It also has practical applications, such as in the design of musical instruments and antennas.

4. How can I plot Gabriel's horn in MATLAB?

To plot Gabriel's horn in MATLAB, you can use the parametric equations x=1/t and y=t, where t ranges from 1 to infinity. Then, use the plot function to graph the curve. You can also use the ezplot function for a more accurate representation.

5. Can Gabriel's horn be physically constructed?

No, Gabriel's horn cannot be physically constructed as it has infinite surface area and would require an infinite amount of material. However, a similar shape can be created by using a cone with a very small base and infinitely tall walls.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Replies
10
Views
3K
Replies
9
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
985
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
957
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top