You are on page 1of 28

Finite Element Method

Prof. C. S. Upadhyay
Department of Mechanical Engineering
Indian Institute of Technology, Kanpur
Module 1 Lecture - 3
In the previous lecture, we had looked at the principle of virtual work for the model one
dimensional problem that we had introduced. We had also introduced concept of the variation of
the function, where u was our displacement function and corresponding to u we defined the
variation of u as del of u.
(Refer Slide Time: 00:21)

We had also introduced a new concept of a functional, which if you remember was defined as the
function of a function; that it would take a function and give us a number. For different functions
we get different numbers. From the definition of this functional we reposed our principle of
virtual work as minimization of a functional and that functional we got corresponding to the
model problem of interest turns out to be the total potential energy corresponding to the system.

We had said that the corresponding equations in the integral form could be obtained by taking a
first variation of the functional that is del of pi and setting it to 0. That is, we are looking for the
function u which minimizes the functional pi.
(Refer Slide Time: 01:32)

After we have done all these, we had also introduced the RITZ method as one of the techniques
to get an approximate solution to the problem of interest. The question is why do we want an
approximate solution? As we have shown that most of the boundary value problems that we may
be interested in will not have a readily available exact solution. That is getting a close form
solution may be almost impossible. In that case we would like to obtain an approximate solution
to that problem and in the one dimensional setting we would like to introduce all the concepts
that are needed in order to obtain a good approximate solution using the method of our choice.
Given this introduction what we will do is develop the RITZ method that we introduced last time
in greater detail. And we will apply it to some typical examples corresponding to the model
problem that we have introduced and we will show how good or bad the RITZ method does with
respect to the solution of these model problems.
Essentially we are creating an artificial situation where we would like to gauge how good the
RITZ solution does or how bad it does. Let us see how we can improve the accuracy of the
solution, and what can be the causes of the solution being bad.

(Refer Slide Time: 03:08)

Remember that our model problem was this bar problem where the cross section of the bar was
non-uniform and it is subjected to a distributed body force f(x) constrained at the point x=0 that is
a displacement is set to 0 at the point x=0 and at the point x=L a force P is applied. Under the
action of this force P this distributed load f (x) and the constraint at the point x equal to 0, I would
like to obtain the solution to this problem.
(Refer Slide Time: 03:50)

Corresponding to the model problem that we have introduced let us rewrite the functional that
we are interested in that is I (u) is equal to pi of u which is equal to integral we will take from
x=0 to L, 1/2 in front EA u comma x whole squared dx minus integral x=0 to L f u dx minus P u
evaluated at x=L; this is our functional. What we had said as far as the solution to the problem
was concerned; the solution u corresponds to a minimum of this potential pi. We said variation of
pi of u is equal to 0 equal to as we have defined, the operation of variation for functions and as
well as for functionals this will be equal to EAu, x variation of u, x dx minus integral x=0 to L f
variation of u dx minus p variation of u at x=L.
Remember that we had said the variation of this quantity 1/2 of EAu, x 2 was as if I have taken
the derivative of this expression with respect to u, and so we end up getting - the 1/2 goes and we
will get integral of EA u, x the variation of u, x dx.
(Refer Slide Time: 06:03)

Given this variation what we will do in the RITZ method as we had said earlier. We are going to
look for an approximate solution of the following form, I will call it by the name u(N) (x). This
will be equal to sigma i=0 to N ai phii of x, where we had said these ais are the coefficients
which are to be determined and phiis are the so called basis functions that are used to define this
series solution. What do we want? If we remember from what we had said last time that the u (N)
(x) has to satisfy the geometric boundary conditions or the essential or the dirichlet boundary

conditions. Which means that we want this one to be at the point x=0 to be =0 that is it is equal
to specified displacement at the point x=0. This has to be satisfied by the u (N) of x. Let us choose
a particular set of this function phii of x the things that we are used to.
(Refer Slide Time: 07:46)

Let us take phii of x is equal to x to the power of i for i going from 0 to N. When we take this and
substituted in our expression we will end up getting u N of x is equal to sigma i is equal to 0 to N
ai x to the power of i. We want u(N) at 0 to be equal to 0 which is equal to what do we get by
substituting 0 for x to the power of i? We will get a 0; so what we end up getting is a 0=0. This is
the constraint that we have enforced. What we end up getting after enforcing the constraint at the
point x=0? We will get the series i is equal to 1 to N ai x to the power of i.
Because a0 has been determined from the boundary condition, once we get this expression now
the question is how do we obtain these coefficients? Let us go back to our variational
formulation. Here if you see we have ux and we have this variation of u, x. What we are going to
do is instead of u of x, we are going to substitute this with u(N) of x and the variation of u will
then become variation of u(N) of x.

(Refer Slide Time: 09:41)

Let us now define what is the variation of u(N) of x. This will be equal to variation of sigma i=1 to
n ai x to the power of i. This function x to the power of i are given to us; what is going to change
in order to get the variation is the coefficient ai. The variation of u(N) of x will become summation
1 to N variation of ai x to the power of i. Once we have obtained this expression for the variation
of u(N), let us go and put it back in our variational formulation. When we put it back in a
variational formulation we will get delta of pi of u(N) is equal to summation of i=1 to N EA which
is a function of x u(N),x and here we will end up getting variation of a i and d dx of x to the power
of i.
What we have done? We have substituted instead of variation of u (N) in expression this
summation. Then will also get minus integral x=0 to L summation, take a summation out any
way I will put it here, variation of a i into f multiplied by x to the power of i the whole thing dx
and finally will get the term minus p x to the power of i evaluated at one at the end. This is the
whole expression that we will get by substituting for variation of u (N) in our variational

(Refer Slide Time: 11:56)

Let us again rewrite the whole thing; we will get - implies summation of i going from 1 to N
variation of ai into, we put the big brackets, integral x=0 to L EA u (N),x d dx I am going to replace
xi by phii. One should understand that in our example we have taken x to the power of i is our
phii dx minus integral x=0 to L f phii dx minus p into phii evaluated at the point L whole
expression is equal to 0, next what? How do we get the equations using which we can determine
the unknown coefficients ai? That is our goal. Then we look at the variation of a i; this is
something that is under our control.
The variation is in a way an abstract virtual displacement that I am giving to the structure which
is already in equilibrium. I can choose what kind of variation i gives; so in a way what I am
saying is that we can vary each of these ais independently - i these are independent coefficients.
That is variation can also be done independently. Let us take for example that I decide to choose
variation of a1 =1 while variation of all the other a j=0 for j is equal to 2 to N. Let us put it back in
this expression. When we put it back into the expression the summation gives as what?

(Refer Slide Time: 14:15)

It gives us by putting the value of the variation of a 1 =1 in all the other variation is equal to 0. We
will get integral x=0 to L EA u(N),x I will write phi1,x dx minus integral x=0 to L f phi1 dx minus P
into phi1 evaluated at x=L =0. Remember what we have done we have taken the variation of a 1 =1
all other variations we have set to 0. That is one choice of the variation that we have taken. That
is we have taken del u(N) of x is equal to 1 into phi1 of x. When we substitute this choice we get
this equation. Let us now expand this equation in terms of the coefficient a i. What will do when
we put it there integral x=0 to L EA sigma j is equal to1 to N a j p j,x P 1,x dx minus x=0 to L f P1
dx minus P into P1 x at x= L.

(Refer Slide Time: 16:02)

Let us now take the summation out we will write summation of i=1 to N let us put j a j integral
x=0 to L EA what will we get phij,x phi1,x dx is equal to, by taking the other part to the right hand
side, integral x=0 to L f phi1 dx plus P into phi1 evaluated at x=L. I have taken the other part to
the right hand side simply because you see that f is known, phi 1 is known, P is known and phi 1 at
x equal to L is also known, because we know the expression for phi one which is nothing but x.
The x evaluated at L we know so all the knowns have been brought over to the right hand side.
What is the unknown? Unknown is aj which remains on the left hand side. Now look at this
expression; this is a number because EA we know, phi j we know because we have chosen the phi j
and phi1 we know we put all of those into the expression of the integral these will turn out to be a
This number we are going to give a name; we will call it K 1j why do we call it 1 j? Because you
see that everything this phij,x is multiplied by phi1,x. So for different phijs we are always
multiplying with phi1, x. This is the first index and the second index comes because of this phi js. If
I write it now in this index form I will get implies summation of j=1 to N K 1j aj is equal to look at
this now on the right hand side. This f is not going to change if you change the phi is. This f will
remain fixed as the function, f into phi1 integral over x=0 will be a number corresponding to phi 1.
Similarly p into phi1 at x equal to L will also be a number corresponding to phi 1. We are going to
call this as F1. This is one equation that we get. Then what we can do is similarly choose the

other delta ais one by one equal to1 and keeping the other ones 0. That is well say that we will
say delta ai for a particular i is equal to one and for all others for j not equal to i. This will be a
particular choice of these varied parameters for this particular choice.
(Refer Slide Time: 21:27)

If I go now to the equation, then we can generalize what we have done corresponding to the phi i
or the delta ai that we have taken; sigma j is equal to 1 to N a j integral x=0 to L EA phij,x phii,x dx
this is equal to integral x=0 to L f phii dx plus P phii evaluated at L. Again you see this
expression; here the j is going from 1 to N that is summing over the js but this i is fixed. What
we can write here is we can replace this by coefficient K ij. This integral becomes the coefficient
or a number Kij. Similarly this one where corresponding to the choice of delta u (N)equal to 1 into
phii will get this one else f in to phii integrated plus P into phii at L.
We will call this by a name Fi which is again a number. What will get as the equation j=1 to N K ij
aj = Fi; now for i going from 1 to 2, toN. That is for each of these I will get an equation. What
we have is a system or linear equations or simultaneous equation in terms of the unknown
coefficients aj.

(Refer Slide Time: 19:48)

This we can write in matrix form as matrix k operating on the vector a is equal to vector F. We
look at this matrix K. This matrix K is of size N by N for the problem that we have taken. This is
the vector of size N that is it has N coefficient a 1 to an this is the vector of size N. This matrix as
we will see can be called the so called stiffness matrix. This vector we are going to give it a name
called the displacement vector. And this vector will be called the load vector. We have this matrix
problem Ka=F which if it can be solved will give as the unknown coefficient a. Once I obtain the
unknown coefficient a then I know the expression for u(N)of x.
Lets us look at this matrix; what are the entries of this matrix? So kij if I look at elements of this
matrix that is the element sitting in the ith row and in the jth column will be equal to integral x=0
to L EA phij,x phii,x dx. Now I ask you the following question: tell me what is the element sitting
in the jth row and the ith column? That will be obtained by bringing this here and bringing that
there. The expression is not going to change because the integral the integrant remains the same
so what we get for this case is that this thing is equal to Kij.

(Refer Slide Time: 24:06)

What does that mean in terms of the matrix notation? It means that the matrix K is symmetric
that is nkij is equal to kji we have K is equal to K transpose. Secondly, if we look at the following
expression 1/2 of a transpose K a; let us say I give you 1/2 set of the coefficients a and then I
would like to evaluate this expression. What is it equal to? This will be equal to from what we
had already defined 1/2 of integral x=0 to L EA in to u bar N, x whole square dx. Where I am
going to call u bar N as a function of x is equal to summation i is equal to 1 to N a i phi i of x. Tell
me this integrant is always greater than 0 when these coefficients ai are not equal to 0.
This means that when this function u(N) is not the trivial function that is u(N)x=0 everywhere then
this expression has to be greater than 0 integrant because I am looking at u bar comma x whole
squared. When this integrant is greater than 0 what do we have? In that case this expression itself
is a transpose KA is greater than 0, for I will say non trivial. What does that mean? That if I
give you any choice of this set of coefficients a I can guarantee that if these as are not all equal
to 0 then this expression 1/2 a transpose KA is greater than 0.

(Refer Slide Time: 24:06)

This means that this matrix K is positive definite. The definition for positive definite for matrix is
that if I give you any set of these vectors a which are non trivial then a transpose K a has to be
greater than 0. And if we look back to the expression that we have taken then the integral that
corresponds to this expression a transpose K a is nothing but twice the strain energy of the
corresponding to the displacement given by u bar N. And for the structure we know that the
strain energy cannot be 0 or negative unless the structure is subjected to a rigid body motion.
Here we dont have any rigid modes so which means that any a, which is non-trivial this is not
greater than 0. Why do we need for this positive definitive for the matrix? Positive definiteness
ensures that this matrix K is invertible. This was not obvious by looking at symmetry. A matrix
can be symmetric but may not be invertible; it could be singular. By this we prove that yes
indeed for our Ritz formulation module problem that we have taken this matrix K is a positive
definite; which means that whatever be the end we can always invert the matrix K.
Why is it important? Because if we cannot invert K then we cannot get the solution vector a
which is given by K inverse F. So once we guarantee invert ability of the matrix then the solution
vector a can be obtained.

(Refer Slide Time: 28:41)

Once we have obtained the solution vector a then now we put it back in our expression for the
solution which is at least in our example it is a i phii of x where ais are now known. This is how
we construct a typical Rayleigh - Ritz or Ritz solution to given boundary value problem. There
can be interesting off shoots to this problem; this is not the only module problem that we may be
interested in; let us say that I want to solve this problem. Let us say I want to solve this problem.
There is the bar subjected to a constraint u at 0 is equal to 0 and a constraint u at L is also equal
to 0. This could be a problem of interest. Now in this case how do we go about constructing the
Ritz approximations? We see that in the earlier case it was very easy to in force the geometric
conditions at the point x=0. We have to in force the geometric conditions both at the points x=0
and x=L. How are we going to do this job? We will take again u (N) of x; we will say it is equal to
something called phi0 bar of x plus summation of i equal to 1 to N a i phii of like this, phi0 bar has
a job of satisfying both these n conditions and the phi is will be such that phii at 0=0 and phii at
What we are going to do is, we are going to choose the phi is and such a way that this satisfies
the 0 conditions at both ends. While phi0 bar takes care of the zero displacement conditions at
two ends. We see that in all problems you may not have the zero displacements condition, you
may have this one as some number delta 1, this one as some number delta 2. In that case phi0 bar

at 0 has to be equal to delta 1 and phi0 bar at L has to be delta 2 while the phiis will satisfy the
conditions of 0 value at two ends.
(Refer Slide Time: 32:03)

In this case let us say that my u at 0 is equal to delta 1 and u at L is equal to delta 2. Then how do
we construct this function phi not of x? Very easy, you take it to be delta 1 into 1 minus x by L
plus delta 2 into x by L. If we look at this expression what happens at x=0 will get x by L=0 and
this other expression is equal to 0, so at this is going to give me phi 0 at 0 is equal to delta 1 and
phi0 bar at x equal to L. If we substitute then this expression is going to go to 0 what we are
going to get here is 1. This will be equal to delta 2. So phi0 bar satisfies the given geometric
constraints exactly at the two points. Then the question is how do I choose the remaining phi is?
In the expression of the u(N) of x phi0 bar is completely known; we have to get this phiis.
So one option if you remember that phii has to be 0 at x=0 and at x=L for this particular case that
we have taken. In this case what choice can be made for phi i? The first function phii can be it has
to be quadratic. Because quadratic is only function which is going to minimum order polynomial
which is going to vanish at the two ends. This can be made x minus 0 into L minus x. So I can
make phi1 of x is equal to x into L minus x; these are all choices that we can make. Similarly phi 2
x will be now cubic. It could be a function going like this. I can take it to be, I am just choosing
things according to my wish, L 2 minus x into L minus x.

What I want this function to do is it should vanish at point x=0, at the point x=L by 2 and the
point x=L. I get a cubic expression x into L by 2 minus x in to L minus x and so on. I can keep
on constructing these phiis which are functions of increasing order polynomials by choosing
appropriate points where they vanish.
(Refer Slide Time: 34:53)

Once I have done this construction then I will put it back in my expression for u (N) of x to get u(N)
of x will be equal to phi 0 bar plus 1 to N ai phii of x. Now our job will be again to find this
coefficients ai. We will substitute this back in our variational formulation; only thing you should
observe is this variation of u(N) of x will be actually equal to variation of phi 0 of x plus,
summation i=1 to N variation of ai phii of x. This phi0 of x is a known fixed function that is we
know what it is. The variation of phi0 of x is 0. What we will end up getting is variation of u (N) is
nothing but summation from 1 to N variation of a i phii of x. So by putting it back in the principle
of virtual work for variational formulation that we have made and by varying choosing particular
values for this delta ais we will get now N equations in terms of the n unknown coefficients a i.
Exactly the way we have done earlier. The only difference will be the u (N) will carry this

(Refer Slide Time: 36:51)

Let me just write it down to make things clear. The ith equation I will just write; that will be
summation of j=1 to N aj integral x=0 to L EA phij,x phii,x dx is equal to integral x=0 to L f phi i dx
plus P phii evaluated at x=L plus a part which will come (you are u (N) of x which was equal to
phi0 comma x) plus the remainder part this part is a known. This will also go not as a plus but as
a minus. We will get minus integral x=0 to L Phi 0 bar comma x in to phii,x in to EA dx. This part
is coming from the known functions phi0 bar, which satisfies the given boundary condition. This
is the additional correction that we have to do to our variation formulation in order to account for
this phi0 bar of x. We have the N equation again in terms of N coefficients this expression will be
nothing but Kij and this whole thing on the right hand side will be our F of i.
We go ahead and solve this problem and get the solution that is the coefficients a i. This is how
you would construct the Rayleigh - Ritz solution for our rating of our problems with different
boundary condition, different load vector and different material coefficients using a polynomial
approximation. Nobody tells us that we should use a polynomial approximation.

(Refer Slide Time: 39:35)

We can also use the sine cosine functions. For example we could have chosen phi i of x is equal to
sin n pi x by L. Very easily we could have done this though our phi 0 of x would have remain
equal to delta 1 into one minus x by L plus delta 2 into x by L. But this phiis for i=1 to N i could
have chosen this in terms of this functions which are trigonometric functions we could have
again obtained the series solutions by following the same procedure.
(Refer Slide Time: 40:30)

Let us now look at an example with which we will demonstrate how this Rayleigh - Ritz method
is used and what is the solution that we will get. Let us take this problem: bar again with an end
load P=10 and subjected to a distributed load of uniform intensity that is will say f of x=1 and we
will say EA is equal to 1. In this case if we look at differential equation at becomes minus d 2 u
dx2 =1 for x line between 0 and 1. We have taken the bar to be of the length 1. And we will say
that u at 0=0 at the end x=1 will have EA du dx where EA now is 1 so you will have du dx at the
point 1=10.
(Refer Slide Time: 40:30)

So corresponding to this one if we now go and choose our phi is as we have done earlier is equal
to x to the power of i and we will take two terms solution let us take N=1.Then our u two of x
will be equal to a1 into x plus a2 x2. So going back to our virtual formulation and writing the final
matrixes I will get K into a is equal to F where K will have entries 1, 1, 1, 4 by 3 you should all
evaluate this entries will convince yourself a1 a2 this is going to be equal to the load which is
equal to 31 by 3 and 41 by 4.

(Refer Slide Time: 42:30)

When we solve this we will end up getting a 1 a2 = 127/12 and -1/4. So our u(2) of x will be equal
to 127/12 x-1/4x squared. This will be our (ralaridge) solution taking 2 terms in the polynomial
Similarly if I now take 3 terms that is I would like to have u(3) of x=a1 x+a2 x2 + a3 x3.
(Refer Slide Time: 44:12)

And again we go through the same exercise we will get the matrix a K as 1, 1, 1, 4/ 3 1 6/ 4 9/5
6/4 also has to be here because it is symmetric. This in to a 1 a2 a3=F1 F2 F3 here F1 F2 F3 can be
evaluated from the integrals. We will end up getting coefficients a 1=10.5 a2=0 and a3= -1/6. So
our u(3) of x will be equal to 10.5x -1/6 x3 and you will see that this is exact solution of this
problem. The exact solution of this problem turns out to be a cubic polynomial and by taking
three terms in the series expansion we have exactly captured that which had to happen. There is
no other thing we could have obtained because we have said that this phi is should be able to
completely represent the highest order polynomial. That is in this case, the linear combination of
the three phiis should be able to exactly capture cubic polynomial and here exact solution was
the cubic polynomial which we have captured.
If we get 10.4x minus something you answer is wrong then you should go back and check your
calculation. This answer should be correct to the last decimal digit.
Let us look at the plots of this expression both the two terms solution and the three term solution
that we have obtained. Whenever we obtain an approximate solution we should again look back
at what is the goal of this whole computation. The goal is to obtain the response quantities of
interest to sufficient level of accuracy.
(Refer Slide Time: 46:47)

Let us look at this graph that we have plotted of the displacement of a two terms solution and for
the three term solution as a function of x.
You see that here you can hardly see a difference the two graphs almost overlap with the exact
(Refer Slide Time: 46:56)

Let us now see what happens when we look at the derivative information. When we look at the
derivative information obviously with the three term solution will over lap the exact one because
it is the exact solution while the two term solution does not do a great job with respect to the
derivative. Though it is not very far if we look at the end value you will get an error if we look at
this point, error in the range of 1% 2% in the value of the derivative. But still if we look at the
derivative information that it is inferior to the accuracy of the value itself. This is going to be a
feature of all the approximation methods. That is if we see good accuracy with respect to
function itself, if we go and taking higher and higher derivatives, the accuracy is going to
decrease. That is we are going to pay the penalty by taking the derivative of the less accurate
Once we have seen that this Rayleigh - Ritz method seems to be doing a great job for the
problem of interest then why go to anything else. We can stick to the Rayleigh - Ritz method and

solve all the boundary value problems using the Rayleigh - Ritz method. Let us see an example
of a boundary value problem where the Rayleigh - Ritz method may not do well.
(Refer Slide Time: 46:56)

Let us take a very simple problem; again our actual bar. This is our fictitious example that we
have created with an end load 10; this is our bar of length 1. At the point x=1/2 I am going to
apply a concentrated load f =20 units. This is at the point x=1/2.
If I write total potential energy corresponding to this problem what will we get, again putting
EA=1? We will get pi of u=1/2 integral x going from 0 to L u, x whole square dx minus 10 u
evaluated at x=1-20 into u evaluated at x=1/2. So work done by the external forces is nothing but
the work done by these point loads at applied at the point 1/2 and 1. So if I do the variation of pi
u will again get integral x=0 to L u, x variation of u, x dx-10 variation of u evaluated at the point
x=1-20 into variation of u evaluated at the point x=1/2.

(Refer Slide Time: 50:30)

Let us now use the same approach that we had taken earlier that is will take phi i of x to be equal
to x to the power of i. We can again take two terms solution N=2. What will get u (2) of x=a1 phi1+
a2 phi2. Substitute back in our variation formulation and get the equation corresponding to a 1 a2 by
what we have done. What we will end up getting is 1, 1, 1; that is the same stiffness matrix that
we had obtained for the previous example because the material has remain the same and phis are
also the same. There is no reason why the stiffness matrix should change. This will be equal to
the load vector. Load vector is what? If you remember it will be P into phi 1 evaluated at 1 plus F
into phi1 evaluated at half, and here it will be p into phi2 evaluated at 1 plus F in to phi2 evaluated
at 1/2.

(Refer Slide Time: 51:47)

We will get again if I rewrite 1, 1, 1 4/3 intoa 1 a2 =P into phi1 evaluated at one is ten plus F in to
phi1 evaluated at 1/2. So x evaluated at 1/2 is 1/2 so 10+10. Second one, P into phi 1 phi2 evaluated
at 1 so phi2 at 1=1. I will get again 10+F into phi2 evaluated at .
phi2 is x square evaluated at 1/2 is 1 4. So into 20 will give us 5. This will be 20 and 15. Out of
this, the coefficients a1 and a2 will come out to be equal to will be equal to 35 and -15. That is u (2)
of x=35x-15x squared. Can you tell me what is the exact solution to this problem? The exact
solution to this problem will be obtained in two parts.

(Refer Slide Time: 55:36)

I am just drawing the bar here; this is F and this is P. What will you get if you cut any where here
from our standard mechanic solids? We will get EA du dx in this region up to this point
x=1/2=10 implies du dx here is equal to 10 which is the constant. I will call this part as part with
the solution 2. So u(2) of x will be equal to I will write it as a 2+b2 into x-1/2 I could always write it
as linear because the slope is the constant where b2 will be equal to 10. Similarly if I look here in
this part I will call the solution as u1. So u1 of x will be such that I will get the slope equal to
what? Slope will be equal F+P which is 10+20 which is 30 30x. If I impose at condition at 0=0=
a1.So u1 will be equal to the function of x - 30x.
We have to obtain a2. How do we obtain a2? By enforcing the continuity of the displacement at
the point x=1/2 that is u1 at = u2 at . So this is going to give us 30 into1/2=a 2 which is equal
to 15. So a2 becomes 15+10 into x-1/ and u1 becomes 13x.

(Refer Slide Time: 56:01)

Now if you plot this function as a function of x; in the first part the slope will be 30 up to the
point x=1/2 and beyond the point x=1/2 the slope will be 10. So up to the point x=1. If you now
take the solution that you obtained using Rayleigh - Ritz method it will do something like this.
This is the EXACT and this is Ritz two terms. If you take three terms it was still do this. That is
what we are going to get as a solution is a polynomial. At this point x=1/2 you will not be able to
capture the change in the slope using the Rayleigh - Ritz solution whatever we do. Your function
will make them close in terms of the values at the point but the derivative will be completely 1/2
at the point x=1/2 because this function is going to get change in slope at the point x=1/2.
So as an engineer that is a cause of worry because this will be one of the points where I would
like to know what is the derivative that is I would like to know what are the stresses such that I
can decide whether this point is going to be safe or not. But our Rayleigh - Ritz solution is not
going to give us the derivatives very accurately here; we will end up getting bad information
regarding the state of stress at the point x=1/2. The question is why Rayleigh did - Ritz method
go wrong here? The answer is quite obvious that in the Rayleigh - Ritz method we are trying to
fit the polynomial over the full domain.
While the solution as you have seen is a piecewise polynomial that is in the region x=0 to it is
the polynomial, which in this case as a region and it is the region to 1 it is also the polynomial

with of the different slope which is also linear. So somehow in our approximation, in the choice
of phiis we have to build in this kind of an information that we should choose pi which can
reproduce the function which are piecewise define, that is the motivation of using a finite
element method. I would say one of the motivations. In the next class I am going to highlight this
point little further, elaborate on it, and make a case for using the finite element method where we
will say what we do in order to rectify these kind of problems.