Docsity

Root Finding and Optimization Concepts - Assignment Problems Solved | EGM 4344, Assignments of Engineering

Toggle sidebar
bg1
HOMEWORK ASSIGNMENT 3
EGM 4344
Rootfinding and Optimization Concepts
Problems from Chapra book chapters 5, 6, and 7
For all of these problems, feel free to use a simple Matlab program to calculate function values
(like using a calculator) when the indicated approach is by hand.
Problem Approach Comments
5.8 Hand Make the plot in part (a) using Matlab and use the plot to
estimate an initial guess for the root. Do the rest of the problem
by hand starting with a lower guess of 0.5 and upper guess of 2.
Put your intermediate results in a table like in the answers
below.
5.8 Matlab Repeat part (b) and (c) problem 5.8 but write two short Matlab
programs (one for bisection and one for false position) to
perform all the calculations. Output your intermediate results to
a table like in the answers below.
5.13 Matlab Use or modify the Matlab bisection program you wrote for
problem 5.8 to solve this problem.
6.1 Hand Output your intermediate results to a table like in the answers
below.
6.4 Hand Make the plot in part (a) using Matlab and use the plot to
estimate an initial guess for the root. Do the rest of the problem
by hand starting with a guess of 0.3. Skip part (c). For part (d),
use
0.001
δ
=
instead of the value given in the problem
statement. Put your intermediate results in a table like in the
answers below.
6.4 Matlab Repeat part (b) and (f) problem 6.4 but write two short Matlab
programs (one for Newton-Raphson and one for modified
secant) to perform all the calculations. Output your intermediate
results to a table like in the answers below.
6.13 Matlab Plot the function to develop an initial guess for the root and then
find the root using the built-in Matlab function
fzero
.
6.23 Matlab
Use the built-in Matlab function
roots
to solve.
7.4 Matlab For part (c), use any rootfinding method you want (suggestion:
use one of the Matlab rootfinding programs you created for
homework problems in chapter 6). Note: Use the equation
64
( ) 1.5 2 12
f
xxxx=− − +
instead of the equation given in the
book for problems 7.4 through 7.6.
7.5 Hand Put your intermediate results in a table like in the answers
below.
7.6 Hand Put your intermediate results in a table like in the answers
below.
pf3
pf4
pf5

Partial preview of the text

Download Root Finding and Optimization Concepts - Assignment Problems Solved | EGM 4344 and more Assignments Engineering in PDF only on Docsity!

HOMEWORK ASSIGNMENT 3

EGM 4344

Rootfinding and Optimization Concepts

Problems from Chapra book chapters 5, 6, and 7 For all of these problems, feel free to use a simple Matlab program to calculate function values (like using a calculator) when the indicated approach is by hand. Problem Approach Comments 5.8 Hand Make the plot in part (a) using Matlab and use the plot to estimate an initial guess for the root. Do the rest of the problem by hand starting with a lower guess of 0.5 and upper guess of 2. Put your intermediate results in a table like in the answers below. 5.8 Matlab Repeat part (b) and (c) problem 5.8 but write two short Matlab programs (one for bisection and one for false position) to perform all the calculations. Output your intermediate results to a table like in the answers below. 5.13 Matlab Use or modify the Matlab bisection program you wrote for problem 5.8 to solve this problem. 6.1 Hand Output your intermediate results to a table like in the answers below. 6.4 Hand Make the plot in part (a) using Matlab and use the plot to estimate an initial guess for the root. Do the rest of the problem by hand starting with a guess of 0.3. Skip part (c). For part (d),

use δ = 0.001instead of the value given in the problem

statement. Put your intermediate results in a table like in the answers below. 6.4 Matlab Repeat part (b) and (f) problem 6.4 but write two short Matlab programs (one for Newton-Raphson and one for modified secant) to perform all the calculations. Output your intermediate results to a table like in the answers below. 6.13 Matlab Plot the function to develop an initial guess for the root and then find the root using the built-in Matlab function fzero. 6.23 Matlab Use the built-in Matlab function roots to solve. 7.4 Matlab For part (c), use any rootfinding method you want (suggestion: use one of the Matlab rootfinding programs you created for homework problems in chapter 6). Note: Use the equation f ( ) x = −1.5 x^6^ − 2 x^4 + 12 x instead of the equation given in the book for problems 7.4 through 7.6. 7.5 Hand Put your intermediate results in a table like in the answers below. 7.6 Hand Put your intermediate results in a table like in the answers below.

Problems from Rao book For each of the problems below, choose the best Matlab optimizer based on the type of optimization problem (linear, quadratic, or nonlinear). Then set up and solve the problem using that optimizer. You will have to create Matlab functions to calculate the value of the cost function and the constraints where applicable. For all problems, use the following optimization options: options = optimset('Display','Iter','MaxIter',100,... 'MaxFunEvals',500,'LargeScale','off'); Problem Approach Comments 12.1 Matlab Beam problem. This problem has two inequality constraints g 1 (^) ( x 1 (^) , x (^) 2 )and g (^) 2 ( x 1 (^) , x 2 ). Add lower bounds on the two design variables so that they cannot be less than 1 in the final solution. Use initial guesses of (0.1, 0.1). 12.5 Matlab Truss problem. This problem has no constraints. Use initial guesses of (0, 0). Note that the answer in the book is incorrect. 12.6 Matlab Rod problem. This problem has one equality constraint g 1 (^) ( x 1 (^) , x (^) 2 ). Solve this problem a constrained optimization algorithms. Use initial guesses of (10, 10). 12.6 Matlab Rod problem again. Resolve problem 12.6 but this time use an unconstrained optimization algorithm that does not require gradient information (hint: you will need to reformulate the cost function). Use initial guesses of (10, 10). 12.8 Matlab Profit problem. This problem has five inequality constraints, two of which are bounds on the design variables. To convert the maximization problem into a minimization problem, use the negative of the given cost function. Use initial guesses of (0, 0).

Answers

(a) Graphical result to determine initial guess

(b)

Thus, after three iterations, we obtain a root estimate of 1.0625 with an approximate error of 17.65%.

(d) Modified Secant

Note: This answer is slightly incorrect, since dx is not 0.001 when i = 0.

ans =

(a)

(b)

Show that the second derivative will always be negative and hence the function will be concave for all values of x.

(c) x = 0.

x =

x = 2.3094e- 2.8868e-

12.6 with constrained optimization algorithm x =

12.6 with unconstrained optimization algorithm x =

Note: Your answer may differ slightly in the last decimal place.

x =