2015 Final
2015 Final
10 10 10 5 5 10 20 20 90
INSTRUCTIONS
Page 1 of 20
USEFUL FORMULAE
1
a b 1 d b
c d ad bc c a
2. Some indefinite integrals
where the triple integral is performed over a volume E, and the double integral is
performed over the surface S that bounds the volume E. The vector n is the
outward pointing normal to the bounding surface S, and is a function of position on
the surface.
5. Corollary of Gauss Divergence theorem
If is a differentiable scalar field, then dV n dS ,
E D
Page 2 of 20
Q.1.A. A FAMISHED BACTERIUM [10 points]
c x, y ln x 2 ( y 3)2
2
(1.1)
(1) [4 points] Calculate the vector field J c , which represents the flux of nutrient
due to diffusion. Also calculate the magnitude of this field, and write the domain and
the range of the function c(x,y).
Solution:
2( x 2) 2( y 3)
J c i j
x 2 ( y 3) x 2 ( y 3) 2
2 2 2
2 point
Magnitude of field
4( x 2) 2 4( y 3) 2
J 2
2
x 2 2 ( y 3) 2 x 2 2 ( y 3) 2
4 ( x 2) 2 ( y 3) 2 2
x 2
2
x 2 ( y 3) 2
2 2
( y 3) 2
1 point
Domain of c(x,y) is the entire 2-D real space except the point (2,3)
0.5 point
Range is ,
0.5 point
Page 3 of 20
(2) [4 points] Sketch J with an arrow plot in the x, y plane. A qualitative sketch that
correctly indicates the direction and magnitude of the vector field will suffice. [This is a lot
easier if you think about the magnitude and direction of the vector field in the polar co-
ordinate system with a suitably-shifted origin before making the sketch in the x, y plane].
Solution:
Use the following transformation x 2 r cos , y 3 r sin . This transforms the vector
field to
2r cos 2r sin
J
r cos r sin
2 2 2 2
i 2
r cos r sin
2 2 2
2
r
j cos i sin j
2
Thus J is a vector field of magnitude J , which decreases as one moves away from the
r
point (2,3), and field also points radially into the point (2,3) .
(3) [2 points] What is the sign of the divergence of the field J at the point (2,3)? Make
an argument based on the arrow plot drawn in part (2). Do not actually calculate the
divergence.
Solution:
Since all the arrows near (2,3) point towards the point (2,3), the field is converging towards
the point (2,3). The divergence, therefore is negative.
In an experiment, you are measuring the pressure of a gas, P (N/m2) as a function of its
temperature, T (deg K), in a vessel of fixed volume V. Your experimental data set contains
N data points, (Ti, Pi) with the counter i varying from 1 to N, which you wish to fit to the
model, P AT BT 2 ,
where A and B are constant parameters. You wish to carry out the fitting by minimization of
the residual, , which is a measure of the deviation between the model prediction of P for a
given temperature Ti, and the experimental measurement, Pi , summed over all the data
Pi ATi BTi 2
N
2
points. It is defined as
i 1
Using the theory of optimization of a function of two variables that you have learned in class,
determine the parameters A and B in terms of the data points.
Solution:
Pi ATi BTi 2
N
2
i 1
The necessary conditions for an optimum require that the partial differentials w.r.t to A and
B be zero at the optimum. Thus
Page 5 of 20
2 Pi A*Ti B*Ti 2 Ti 0, or
N
PT A T B*Ti 3 0 , or
N
* 2
A i 1
i i i
i 1
N N N
A* Ti 2 B* Ti 3 PT
i i. (1)
i 1 i 1 i 1
N
2 Pi A*Ti B*Ti 2 Ti 2 0, or PT A*Ti 3 B*Ti 4 0 , or
N
2
B i 1
i i
i 1
N N N
A* Ti 3 B* Ti 4 PT 2
i i . (2)
i 1 i 1 i 1
N 2 N
3 N
i T T i
A
* PT
i i
i 1 i 1
i 1 .
N 3 * N 4 B* N 2
Ti Ti PT i i
i 1 i 1 i 1
Setting up the linear system : 0.5 point
The solution of this system of equations is obtainable from ‘Useful formulae 1’.
Solution of linear system: 0.5 point
We still need to prove that this is a minimum. For this we compute the hessian H, which is
the matrix of second partial derivatives
2 2
A2 AB
H 2
2
AB B 2
where
2 N
2
2 N
2 N
A 2
i 1
2Ti ,
B 2
i 1
2Ti
4
,
AB i 1
2Ti 3 .
Page 6 of 20
2
2 2 2 N
2
2 4
N N
det H 2
A B AB i 1
2 2Ti
i 1
2Ti
i 1
2Ti 3
N 2 N 4 N 3 2
4 Ti Ti Ti
i 1 i 1 i 1
N N N N
4 T j4Ti 2 Ti 3T j3
i 1 j 1 i 1 j 1
4 T j4Ti 2 Ti 3T j3
N N
i 1 j 1
4 Ti 2T j3 T j Ti
N N
i 1 j 1
i 1 j 1
i 1 j 1 i 1 j 1
i 1 j 1
2 Ti 2T j2 T j Ti .
N N
2
i 1 j 1
A snack manufacturer sells two kinds of snacks, labeled A and B, at costs of $2.50
per lb and $3.00 per lb respectively. Mixed nuts A contain 30% almonds, 10% cashew
nuts and 15% walnuts and 45% peanuts. Mixed nuts B contain 10% almonds, 20% cashew
nuts, 35% walnuts and 35% peanuts. A nutty customer wants to use mixed nuts A and B to
prepare a new mix for his party by spending as little as possible. This new mix should
contain at least 4 lb of almonds, 5 lb of cashew nuts and 6 lb of peanuts.
Page 7 of 20
You have available to you a solver that can only maximize objective functions. The
solver accepts equality constraints in the form g x1 , x2 ,, xn 0 , and inequality
constraints in the form h x1 , x2 ,, xn 0 , where x1, x2, … xn are the decision variables.
Question: Set up the optimization problem for minimizing the cost in a way that can be
fed to the available solver. Identify the decision variables to be optimized, the objective
function and the constraints. (Do not solve the problem! Only set it up). Is this a linear
programming, a quadratic programming or a nonlinear programming problem?
Solution:
Let x and y be the number of pounds of snack A and snack B that the manufacturer needs to
use to make the new mix. These are the decision variables
Identification of decision variables : 1 point
The cost of the mix is C 2.50 x 3.00 y dollars, and this needs to be minimized.
Objective function :1 point
The constraint for on the number of pounds of almonds gives 0.3x 0.1y 4 .
The constraint for on the number of pounds of cashews gives 0.1x 0.2 y 5 .
The constraint for on the number of pounds of peanuts gives 0.45 x 0.35 y 6 .
Q.2.A. [5 points] Sketch the domain of integration for the double integral,
Page 8 of 20
e 1 1
I sin e x x dx dy ,
0 ln 1 y
and evaluate the integral. Here, e is the base of the natural logarithm [Hint: Switch the order
of integration].
x 1 y e 1 y e 1
x x
x 1
I sin e x dx dy sin e x dx dy
x
x
y 0
x 0 y 0 x 0
x 1
sin e x x e x 1 dx cos e x x cos 0 cos e 1
1
x 0
0
1 cos e 1
1 (innermost integral is in z) and type 2 (innermost integral is in x). Here, E is the volume
bounded by the surfaces y x2 , z 0 and y 2 z 4 . Sketch the volume domain first, and
label each bounding surface. Also sketch the domain of the double integral that will result
after performing the innermost integral in each of these types, with labels for the bounding
curves.
Solution:
Page 9 of 20
y x 2 is a parabolic surface that has the y-z plane as its symmetry plane, with the
projection, y=x2, in the x-y plane.
y+2z=4 is a plane, which is invariant in the x direction (i.e. does not intersect it), and is has
intercepts y=4, and z=2 along the y and z axes.
z=0 is the x-y plane.
The volume domain is, therefore,
Volume domain sketch: 1 point
Type I integral
z (4 y )/2
f x, y, z dV f x, y, z dz dxdy
E Dxy z 0
where the area domain of integration, Dxy, is the parabola y=x2, with x ranging from -2 to 2
and y ranging from 0 to 4.
Correct type 1 integral: 1 point
Domain sketch: 1 point
Type II integral
x y
f x, y, z dV f x, y, z dx dydz
E Dyz
x y
where the area domain of integration, Dyz, is the triangle bounded by y+2z=4, y=0 and z=0.
Page 10 of 20
Q.2C. [10 points] FLOATING BALL
Consider a spherical ball of radius R (cm) floating on the surface of a liquid. The
pressure above the liquid is atmospheric pressure. z R
The submerged height of the sphere is h (cm), r (z)
h
which can vary from 0 (completely floating ball)
g
to 2R (completely submerged ball).
1) [4 points] Calculate the submerged volume, Vs, of the sphere by calculating the
following double integral in r and z:
Rh r R2 z 2
Vs 2 r dr dz
R r 0
Show that Vs is equal to the total volume of the sphere, V 4 R / 3 , of the sphere
3
R z
2 r dr dz 2r dr dz
2 2
Vs
2
r dz
0
R r 0 R r 0 R
Rh
Rh
2 z3
R z dz R z 3
2 2
R R
2 R h 2 R
3 3
R R h R R
3
3
3R 2 R h 2 2 R 3
R h
3 3
R h 2 R 2 2 Rh h 2 2 R 3
3
2 R 3 2 R 2 h Rh 2 2 R 2 h 2 Rh 2 h 3 2 R 3
3
3
3Rh 2
h3 .
Page 11 of 20
3 points for integral evaluation
When the sphere is completely submerged, h=2R
Vs
3
12R 3
8R3 4
3
R3 V .
2) [1 point] If the density of the sphere is s, and the density of the liquid is l, perform
a force balance on the body, considering that the downward force is the weight of the
body, and the upward force is the buoyant force due to part of the sphere submerged
Vs s
into the liquid. You should get the non-linear equation, , that connects the
V l
submerged height, h , the radius R of the sphere, and the two densities. Note:
According to the Archimedes principle, the buoyant force is the weight of the liquid
displaced by the submerged portion of the body.
Solution:
The weight of the ball acting in the downward direction is sVg .
Vs s
Equating the two, we have sVg lVs g , which gives .
V l
1 point for proving force balance result
3) [5 points] [This part does not require you to get part 2 right] Use the Newton-
Raphson method to numerically figure out the submerged height for a ball of radius R
= 10 cm, if s 800 kg/m3, l 1000 kg/m3. Use an educated, initial guess. Get to
an approximate percentage relative error of less than 2%.
Solution:
Vs 3
3Rh 2 h 3
s
V 4 3
R l
3
Page 12 of 20
h h 4
2 3
3 s 0
R R l
Setting up f : 2 points
h* lies between 0 and 2. So a reasonable guess would be midway, at h*=1. Just two
iterations of the N-R method are needed to get below the required error tolerance.
hi f f' hi+1 a
Consider a Newtonian fluid flowing through a straight pipe of length L as shown in the
figure below. The shape of the cross-section of the pipe is arbitrary, but it does not vary
along the length of the pipe. The cross-sectional area of the pipe is Ac, and the perimeter of
the cross-section is T. The axis of the pipe is in the x direction, y and z are the cross-
sectional co-ordinates and the velocity component along the flow direction is u. The flow
is unidirectional, i.e. the velocities in the y and z directions are identically zero.
u
dP
(3.1)
dx
Page 13 of 20
Here, is the viscosity of the fluid, P is the pressure in the fluid, and in this problem, P is a
function only of the axial co-ordinate x. Hence, we write the differential of P with x as a
total derivative, and not a partial derivative.
Surface Sc (the
wall of the pipe)
y
x
z
L
d dP dP
Since 0, is a constant.
dx dx dx
Demonstrating that dP/dx is constant: 2 points
u dV dx dV
dP
(3.3)
E E
Here, the domain E is the entire volume of the pipe of length L. Take the right hand
side first. Evaluate the right hand side, in light of the result in part (1) of this
problem.
Solution:
dP dP dP dP
dx dV dx 1 dV dx V dx A L
E E
c
3) [2 points] Now consider the left hand side of the Eq. (3.3). Apply the Gauss
Divergence theorem to transform this volume integral to a surface integral over a
closed surface.
Solution:
Page 15 of 20
Application of Gauss divergence theorem: 2 points
4) [5 points] Split up the closed surface integral in part 3 into double integrals on three
open surfaces, Si, So and Sc. Si is the flat surface representing the pipe entrance, Sc is
the surface of the pipe wall, and So is the flat surface representing the pipe exit. The
three surfaces when put together give the entire volume E of the pipe. Show that the
integrals on the surfaces Si and So are identically zero.
Solution:
u ndA
S
ˆ u ndA
Si
ˆ u ndA
So
ˆ u ndA
ˆ
Sc
For the surface Si, the outward pointing unit normal is iˆ .
u
ˆ u iˆ dA u idA
u ndA x
ˆ dA
Si Si Si Si
Similarly, for the surface So, the outward pointing unit normal is iˆ . Therefore,
u
u ndA
So
ˆ u idA
So
x
ˆ dA 0
So
Page 16 of 20
u ndA
S
ˆ 0 0 u ndA
Sc
ˆ u ndA
ˆ
Sc
5) [1 point] Evaluate ASc , the area of the surface Sc, in terms of the geometrical
parameters provided in the figure for this problem.
Solution:
ASC TL
Using the results in parts (2), (3), (4) and (5), show that
dP A
w c
dx T
Solution:
From the results in part 2 and 4,
dP
u ndA
Sc
ˆ
dx
AL c
Page 17 of 20
Solution:
The applied pressure difference time the cross-sectional area, PAc , which is the
pressure force pushing the liquid in the channel, is balanced by the wall stress w LT .
This will yield the above result.
Here, is the time constant of response of the membrane, is a damping constant and K p
is a constant related to the mechanical properties of the diaphragm.
For a sensor with 0.002 s, 0.25 and K p 105 mm/(N/m2), the pressure
difference P is changed from 0 to 1.013 105 N/m2. The initial conditions are
dz
z t 0 t 0 0 .
dt
1) [4 points] Rewrite the above 2nd order ODE into a system of two first-order ODEs.
Write the initial conditions for this system of first-order ODEs.
Solution:
dz
Define y1 z and y2
dt
1 point for creating new variables
Page 18 of 20
The governing equations for y1 and y2 are
dy2 1 dz 1
2 K p P z 2 2 K p P y1 2 y2
dy1
y2 ,
dt dt dt
2 points for ODEs
The initial conditions are y1 t 0 y2 t 0 0 .
1 point for initial condition
2) [12 points] Integrate the system of first-order ODEs obtained in (1) from t 0 to
t 0.01 seconds in intervals of 0.001 seconds. Tabulate your results, and make a
sketch of the behavior of z vs. t.
Solution:
Page 19 of 20
3) [2 points] At steady state, determine the displacement z for the new pressure
difference.
Solution:
d 2 z dz
At steady state, 0. The steady state value of z should be
dt 2 dt
z K p P 1.013 mm.
Page 20 of 20