/* In void prob1()
a) write void gauss_3pt(double gauss[3], double weight[3])
to define the Gauss coordinates g0, g1, g2 and corresponding weights
w0, w1, w2. Their coordinates are g2= -g0= sqrt(3/5), g1=0 and
w0=w2=5/9, w1=8/9.

write double h_test(double x) to compute and return h(x) for a
given value of x on -1<= x <= 1:
h(x) = 2.0*x*x + cos(0.5*x) - x*x*x*x.
c) In prob1(), declare double g[3], w[3] and call void gauss_3pt() to
define values for g[3], w[3]. Then to numerically evaluate the area
of h(x) on -1<= x <=1 by using the 3 point Gauss integration, compute:
sum of h(g[k])*w[k] for k=0, 1, 2
where h(g[k]) denotes h(x) for x=g[k]. Print the area using %11.3e.*/
void prob1(void)
{
printf("Here is Problem 1:\n");
return;
}
/* In void prob2(), consider a column of length L and bending stiffness
EI, whose bottom end is clamped and the top end is pinned. Let the top
end of the column be subjected to a vertical load P. In void i
prob2(void) you are asked to find the critical buckling load, P, of
the column by finding the smallest positive root of the characteristic
equation:
g(x) = x - tan(x) = 0 (1)
where x = kL and k*k = P/EI.
In order to find the interval of x in which g(x) changes sign, create
a table for 2<= x <=4.7 and g(x). Once you find the interval where
g(x) changes sign, use the Newton-Raphson function to refine the
root. Print the smallest positive root using %13.3e.
(Note) The derivative of tan(x) with respect to x is 1/(cos(x)*cos(x)).
Since tan(x) becomes discontinuous at PI/2 and 3 PI/2, the sign changes
at those neighborhoods do not indicate the existence of some roots. */
void prob2(void)
{
printf("Here is Problem 2:\n");
return;
}
/* In void prob3()
a) write
void shape3_1d(double q, double sh[3])