syms x1 x2 E = 75e6; h = 4; H = 20; b = 8; P = .8; w = 2.5; rho=2700; F = P*b*h;
ID: 3604385 • Letter: S
Question
syms x1 x2
E = 75e6;
h = 4;
H = 20;
b = 8;
P = .8;
w = 2.5;
rho=2700;
F = P*b*h;
W = w*b*h;
A=0.25*pi*(x1^2-(x1-2*x2)^2);
I=(pi/64)*(x1^4-(x1-2*x2)^4);
sigma=(F/(E*I))*(((H^3)/3)+((H^2*h)/2)+((H*h^2)/4)); %deformation
M=W*sigma;
fa=W/A;
fa_limit=300e6;
fb=(M*x1)/(2*I);
fb_limit=140e6;
mass=A*H*rho;
g_1=(fa/fa_limit)-1;
g_2=(fb/fb_limit)-1;
g_3=(sigma/0.1)-1;
g_4=(x1/2.5)-1;
g_5=(0.1/x1)-1;
g_6=(x2/0.1)-1;
g_7=(0.0005/x2)-1;
g_8=(x1/(x2*92))-1
grad_g1=([diff(g_1,x1);diff(g_1,x2)])
grad_g2=([diff(g_2,x1);diff(g_2,x2)])
grad_g3=([diff(g_3,x1);diff(g_3,x2)])
grad_g4=([diff(g_4,x1);diff(g_4,x2)])
grad_g5=([diff(g_5,x1);diff(g_5,x2)])
grad_g6=([diff(g_6,x1);diff(g_6,x2)])
grad_g7=([diff(g_7,x1);diff(g_7,x2)])
grad_g8=([diff(g_8,x1);diff(g_8,x2)])
function [g,h, gradg , gradh] E=75e6; %kpa h = 4; H 20; const (x) = w = 2.5; rho-2700 F=P*b*h; kn/m^2 kn/m^2 % kg/m^3 %wind force w*bh weight A=0.25"pi* (x (1) rg. (x(1)-2% (2)) ^2) ; %deformation sigma= (F/ (E*1)) * ( ( (H^ 3) /3) + ( (H"2th)/2) + ( (e*h"2) /4)) ; M=W" sigma ; fa-W/A fa limit=300e6; smoment at base %axial stress %bending stress fb limit=140e6; mass-AH*rho; sconstraint g(1)=(fa/ falimit)-1; g (2)=(fb/fb-limit)-1; g(3)=(sigma/0.1)-1 ; %% % %% axial load smaller than 300e6 Pa bending smaller than 140e5 Pa de formation smaller than 0.1 m - h= [ ]; if nargout > 2 gradg(: ,1) [ 0.019634 95408* (x (1) -0.03926990817* (x (1) -2.0*x (2))3 = 2.0*x (2))^3-0. 01963495408*x(1)"3; _ gradg ( : , 2) gradg(:, 3) [-942477.7961*x (2); 1884955.592 *x (2) -942477.7961*x (1)]; [0.04842382222-674.6799884*( (x(1) -2.0*x(2))"4- = 1.0*x 1)4)(4.0* (x (1) - 2.0*x (2))3- 4.0x) 3) 5397.439907*(x(1) - 2.0*x (2))4 -1.0*x (1) 4)(x (1) -2.0x (2)) 3] gradh = [ ] ; endExplanation / Answer
For the given program gradg(1) , gradg(2)… are 1st derivative of the equation formed g(1), g(2) … ;
They are not 2nd derivate of g(1) ..
Let’s see the equation for g(1) which is given as: g_1in given code: g_1=(fa/fa_limit)-1
The value of fa is given by fa=W/A , where
W = w*b*h and A=0.25*pi*(x1^2-(x1-2*x2)^2) (given)
So, fa = -320/(pi*((x1 - 2*x2)^2 - x1^2))
And fa_limit=300e6 (is given)
Now we have fa and fa_limit , so we can get the equation for g_1 , by putting the values of fa and fa_limit
g_1 = - 1/(937500*pi*((x1 - 2*x2)^2 - x1^2)) - 1
Now take the 1st derivative of g_1 with respect to x1 and again 1st derivative of g_1 with respect to x2
We will get output as:
grad_g1 = -x2/(234375*pi*((x1 - 2*x2)^2 - x1^2)^2)
-(4*x1 - 8*x2)/(937500*pi*((x1 - 2*x2)^2 - x1^2)^2)
Conclusion : gradg(1) , gradg(2)… are 1st derivative of the equation formed g(1), g(2) …
Hint: If you take the 1st derivative of 1/x it will be -1/x^2
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.