Homework answers / question archive /
A spherical float (spherical cap)
Question 1:
A sphere of radius R cm and density ρe kg/m3 is submerged in seawater
A spherical float (spherical cap)
Question 1:
A sphere of radius R cm and density ρe kg/m3 is submerged in seawater
Computer Science
Share With
A spherical float (spherical cap)
Question 1:
A sphere of radius R cm and density ρe kg/m3 is submerged in seawater. The sphere floats as long as its density is less than the seawater density, which is approximately ρa= 1027 kg/m3. Find the height, h, of the portion of the float that is below water as shown in Figure Q1.1.
According to Archimedes’ Principle, the buoyancy force acting on an object that is partially immersed in a fluid is equal to the weight of the fluid that is displaced by the portion of the object that is submerged.
The spherical cap volume of height h is:

|
(1)
|
The buoyancy force is:

|
(2)
|
The difference between the buoyancy force Fg and the sphere weight Fg is:

|
(3)
|
The portion of the float that is submerged is obtained when the mass of the float equates the mass of the water that is displaced, this equation is given by:

|
(4)
|
Solve for h in (4) using the following data:

- Solve the question with the iterative algorithm shown below.
- Solve the cubic equation with Newton-Raphson algorithm.
- Solve the equation with fzero.
- Solve the equation with the solve command available in the Symbolic toolbox.

Figure 1 Figure Q1.2. Iterative algorithm
|

Figure Q1.1. Spherical float
Iterative algorithm
- If
, the spherical float sinks.
- Otherwise, we can try the initial h values as
, there is no submerge part and
, all the spherical float is submerged. Equation (3) dif(h) is evaluated at h0 and h1
- If
or
is not a solution, then we can check if the average value
satisfies equation (4).
- If
then the h value is within
and 
- If
then the h value is within
and 
- The process is repeated using the new approximation of h as the mid-point of the interval where the height solution lies.
- The process is stopped when the difference between successive approximations between the new
and
is less than a minimum value ε.
Question 2
Calculation of trigonometric functions
Taylor series can be used to approximate the following trigonometric functions [1,2]:


- All angles are expressed in radians. The numbers Bk appearing in the expansions of tan x are the Bernoulli numbers.
- These series approximations and CORDIC are used in computers for finding the value of trigonometric functions.
- Plot the principal branches of sin-1(x), cos-1(x), tan-1(x)
- Write a MATLAB function called (trigTaylor) that takes 3 input arguments (x,numterms, type) and returns the value of the trigonometric functions evaluated at x. The input parameters are:
- x à number where is evaluated (for sin, cos and tan is an angle in radians)
- numternsà number of terms used for the series approximation
- typeà select the type of trigonometric function.
- Write a program that prompts a message in the command window so the user can select the trigonometric function and obtain the approximated value. By default, the program uses 10 Taylor terms. The program checks if the input argument x is within the domain of the Taylor series otherwise it displays an error. The program also displays the error between the approximated value and the associated MATLAB function.