0% found this document useful (0 votes)
153 views15 pages

Solutions For Exercises: Engineering Optimization by Ranjan Ganguli

Accelerate your mastery of optimization techniques with solutions for exercises from Engineering Optimization by Ranjan Ganguli. This comprehensive guide covers linear programming, nonlinear optimization, and applications in engineering, ensuring a strong grasp of critical concepts.

Uploaded by

industriale82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views15 pages

Solutions For Exercises: Engineering Optimization by Ranjan Ganguli

Accelerate your mastery of optimization techniques with solutions for exercises from Engineering Optimization by Ranjan Ganguli. This comprehensive guide covers linear programming, nonlinear optimization, and applications in engineering, ensuring a strong grasp of critical concepts.

Uploaded by

industriale82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Contact me in order to access the whole complete document. Email: smtb98@gmail.

com
WhatsApp: https://wa.me/message/2H3BV2L5TTSUF1 Telegram: https://t.me/solutionmanual
Chapter-1: Basic Concepts
Problems
ssm
1. Expand e x as a Maclaurin series. Estimate the value of e 0.5 , e 2 and e 5 using this series to get 1 per cent
mtt
accuracy with respect to the exact values. How many terms are required to achieve this accuracy level?
Repeat the problem by using a Taylor series expansion of e x about x  2.5 ? Comment on your results.

Solution:
bb99
2. Expand √ about x  1,2 and 4 to second order. Plot the function and the approximation and
comment on your results.
88@
Solution:
@
Taylor series expansion of the function √ around the point x=

Higher order terms


ggm
Second order approximation or quadratic approximation of the function around the point x=a will be
maa

We need the first and second order derivatives for the Taylor series expansion:

and

Now 2nd order approximation of the function around the point x=1
iill..cc

( )


oom

2nd order approximation of the function around the point x=2


m

√ ( )

complete document is available on https://unihelp.xyz/ *** contact me if site not loaded


2nd order approximation of the function around the point x=4

√ ( ) ⇒

Plots:

There are four plots i.e. f(x) vs. x; f(x) at x=1 vs. x; f(x) at x=2 vs. x; and f(x) at x=4 vs. x and these four plots
are shown in the Matlab as (f vs. x) ;(f1 vs. x) ;(f2 vs. x) ; (f4 vs. x) respectively.

Comment:

From plots it is observed that the 2nd order approximated functions are matching with the original function in
the neighbourhoods of the given points or around those points but then the approximated functions diverge from
the original one away from the points. This means they are good approximations of the original function locally
but not globally.

Thus Taylor’s series expansion is local and differs from point to point for most functions. Methods derived from
Taylor’s series are good locally. The local nature of Taylor’s series expansions is very important.

3. Expand the following function in a Taylor series about (1,1) up to two terms:

f ( x)  x1e ( x1  x2 )
3

Solution:

4. Expand the following function in a Taylor series about (1,2) up to two terms
f (x)  x14  x24  4 x13 x23

Solution:
( ) ( )

( ) ( )

( )

( )

( ) ( ) ( ) ( )( )

5. Expand the Rosenbrock function f (x)  100( x2  x12 )  (1  x1 )2 about (1,1) as a Taylor series retaining (a)
two terms and (b) three terms. Compare these approximations in the vicinity of (1, 1) with the actual
function. Comment on your results.

Solution:

Given the Rosenbrock function (Eq. (1)) which to be expanded


about (1,1) as a Taylor series retaining (a) 2 terms &(b) 3 terms. We can write the Taylor’s series in matrix
notation for a function of n variables as

Where R is the higher order terms (that are neglected) and n=2

Here,

, , [ ]
= =0

H = [ ]=[ ]

(a) Therefore retaining 2 terms the Taylor series expansion is:

0+[ ][ ]

(b) Therefore retaining 3 terms the Taylor series expansion is:

0+[ ][ ] [ ] [ ]

[ ]

Now we are considering the equations (1),(2) &(3) in the vicinity of (1,1), say at where
| |

From Eq (1), [ ) - ]+[ ]

From Eq (2), [ ] [ ]

From Eq (3), [ ] [ ]– [ ]
Comparing these approximations we conclude that evaluation of the Taylor Series expansion of function
in the vicinity of ( is more accurate (rather exact) when we retain 3 terms than in the case when we
retain 2 terms.

6. Find a cubic polynomial with minimum at 5 and max at -5.

Solution:

Let f(x) is the cubic polynomial for which min is at 5 and max at -5.

For the function to be minimum or maximum,

f ‘(x) = 0

Since f(x) is a cubic polynomial f ‘(x) is a quadratic polynomial

Roots of f ‘(x)=0 are x=5 and x=-5 (since min at 5 and max at -5)

 f ‘(x)=(x+5)(x-5)
=x2 - 25
On integrating f ‘(x), gives

f(x)= -25x + constant


Let constant of integration = 0

So f(x)= -25x is the polynomial whose min at 5 and max at -5


(f ‘’(x)=2x,
f ‘’(5)=10>0 so x=5 is the minimum point
f ‘’(-5)=-10<0 so x=-5 is the maximum point)

7. Find the stationary points of the following function and determine if they are minimum, maximum or
points of inflexion.

f (x)  x 4  6x3  3x 2  10x

Graphically verify your results.

Solution: Given,
f (x)  x 4  6x3  3x 2  10x

Differentiating the function,

f ' (x)  4x 3  18x 2  6x  10


f '' (x)  12x 2  36x  6

For determination of the stationary points we need to equate f ' (x)  0

f ' (x)  0
 4x 3  18x 2  6x  10  0.......................(1)

Solving Equation (1) we get x=3.962, -0.57 and 1.11

So, the stationary points of the given function are 3.962, -0.57 and 1.11

We need to find if they are minimum points, maximum points or points of inflexion. So, we determine the

values of f '' (x) at the stationary points.

f '' (x)  51.74  0 at x=3.962


f '' (x)  30.4  0 at x=-0.57
f '' (x)  19.15  0 at x=1.11

From these values of f '' (x) we can comment that there are two local minimum points (at x=3.962 and -0.57)
and one local maximum point (at x=1.11). A global minimum or maximum for f (x) does not exist since the
domains as well as the function are not bounded.

Now,

f (x)  40.04 at x=3.962


f (x)  3.51 at x=-0.57
f (x)  8.11 at x=1.11

So, we can say that one local minimum is at x=3.962 and the value of f(x) at that local minimum point is -40.04.
Another local minimum is at x=-0.57 and the value of f(x) at that local minimum point is -3.51. The local
maximum is at x=1.11 and the value of f(x) at that local maximum point is 8.11.
Graphical determination

Since the domain and the function f (x) are unbounded, ( i.e., x and f (x) are allowed to have any value between
 and  ) there is no global minimum or maximum for the function. Figure 1 is showing a plot between f(x)
and x, for the x values are ranging between -1.25 to 5.25. We can find that one local minimum is at x=3.962 and
the value of f(x) at local minimum point is -40.04, another local minimum is at x=-0.57 and the value of f(x) at
local minimum point is -3.51 and the local maximum is at x=1.11 and the value of f(x) at local maximum point
is 8.11. f(x) vs x graph

25

15

-1.25 -0.75 -0.25-5 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 5.25
f(x)

-15

-25

-35

-45

Figure 1: Graph of the given function

8. What are the stationary points of the function f as a function of the scalar c.

1 2
f ( x)  cx12  x2  2 x1 x2  4 x2 .
2

For what value or values of c is the point a minima, maxima or a point of inflection?

Solution:

9. Find the stationary points of the function

Determine if the points are minimum, maximum or points of inflexion. Plot the function to verify your
results. Conduct an exhaustive search of the design space by creating a grid in terms of the two design
variables and write a computer program to find the minimum and maximum points. Comment on your
results.

Solution:

We calculate the gradient and set it to zero

{ }

( )

( )

Solving the above two equations for and we get the following feasible stationary points

0 0 0 1 -1

0 1 -1 1 0

The Hessian is calculated as

[ ]

( )

( )

( )
Eigen values of
Conclusion

Hessian Indefinite.

0 0 [ ] 2, -2 Hence (0, 0) is a saddle point

Hessian Positive Definite.

0 1 [ ] 4/e, 4/e Hence (0, 1) is a minimum point

Hessian Positive Definite.

0 -1 [ ] 4/e, 4/e Hence (0, -1) is a minimum point

Hessian Negative Definite.

1 0 [ ] -4/e, -4/e Hence (1, 0) is a maximum point

Hessian Negative Definite.

-1 0 [ ] -4/e, -4/e Hence (-1, 0) is a maximum point


This verifies that the points that were calculated earlier are indeed the stationary points with respective maxima,
minima and saddle point conditions. For finding the solution using exhaustive search more number of grid
points are required

MATLAB Program for searching the maxima and minima:

%This program searches for the maxima and minima

clear;clc;

x1=-3:0.1:3;

x2=x1;

fmax(1)=0;

fmin(1)=0;

kk=1;mm=1;

changemin=0;

changemax=0;

for ii=1:length(x1)

for jj=1:length(x2)
f(ii,jj)=(x1(ii)^2-x2(jj)^2)*exp(-(x1(ii)^2+x1(jj)^2));

if f(ii,jj)>fmax(kk)

if changemax==1

kk=1;

fmax=[];

pmax=[];

changemax=0;

end

fmax(kk)=f(ii,jj);

pmax(kk,:)=[x1(ii) x2(jj)];

elseif f(ii,jj)==fmax(kk)

kk=kk+1;

changemax=1;

fmax(kk)=f(ii,jj);

pmax(kk,:)=[x1(ii) x2(jj)];

end

if f(ii,jj)<fmin(mm)

if changemin==1

mm=1;

fmin=[];

pmin=[];

change=0;

end

fmin(mm)=f(ii,jj);
pmin(mm,:)=[x1(ii) x2(jj)];

elseif f(ii,jj)==fmin(mm)

mm=mm+1;

changemin=1;

fmin(mm)=f(ii,jj);

pmin(mm,:)=[x1(ii) x2(jj)];

end

end

end

disp('The maxima points are');

disp(pmax);

disp('The corresponding maxima values are');

disp(fmax);

disp('The minima points are');

disp(pmin);

disp('The corresponding minima values are');

disp(fmin);

OUTPUT:

The maxima points are

-1 0

1 0

The corresponding maxima values are

0.3679 0.3679

The minima points are


0 -1

0 1

The corresponding minima values are

0.3679 -0.3679

10. Solve the following problem using optimality criteria:


Minimize f ( x1 , x2 )  x14  x24 subject to x1  8x2  32 .

Solution:

From equations on solving these equations

The optimal value of the function is given at (1.882 , 3.764)

( )
No constrain, Function Curve

From the above figure we can understand that the optimum value of the function comes at(1.882,3.764)while
the minimum valu of the function with out constrents is at(0,0)

Constrained Function Curve

11. Solve the problem using optimality criteria


Minimize ex subject to 1  x 2  0

Solution: First we need to convert the inequality constraint into the desired form:- x2  1  0

The inequality is transformed to equality by adding a positive number. x2  1  s 2  0

Here s is called a slack variable and can have any real value. Obviously, s 2  0
Now the constrained optimization problem is converted into unconstrained problem using Lagrangian function
as:

L  ex  u  x2  1  s2 

The Lagrange multipliers for each inequality constraint must be non-negative. i.e. u  0
. If the inequality constraint is inactive at the optimum, u  0 . If the inequality constraint
is active then u  0 .

Next, we set the gradient of the Lagrange function to zero

L
 e x  2ux  0
x
L
 x2  1  s2  0
u
L
 2us  0
s

Now, we consider the various possibilities created by the switching condition us  0

Case I:

s  0, u  0
e 1 e 1
e x  2ux  0  u  ,
2 2
x 2  1  0  x  1
us  0
e1 e1
Solving these equations yields x  1, s 2  0, u  , . This solution corresponds to a case where the
2 2
inequality is active.

Case II:

You might also like