You are on page 1of 6

>

> restart : with linalg : with plots : with student : with LinearAlgebra : with ArrayTools :
11 3
> L1 d 600 : L2 d 400 : L d L1 CL2 : EI1 d 2$1.5$10 : EI2 d 0.5$EI1 : P d 100$10 :
0
∆B d 1.5 : ∆ d :
∆B
> EI z d piecewise 0 % z ! L1, EI1, L1 % z % L, EI2 :
MX1 z
> MX1 z d 1$z : MX2 z d piecewise L1 % z, 1$ z KL1 : MX12 z d :
MX2 z
> MP z, z0 d piecewise z0 % z,KP$ z Kz0 :
> i d 1 ..2 : j d 1 ..2 :
L
MX12 z i $MX12 z j
> δx i, j d dz :
EI z
0
> δ d Matrix 2, 2, δx :
L
MX12 z i $MP z, z0
> ∆Px i d dz :
EI z
0
> ∆P d Vector 2, ∆Px :
> X z0 d linsolve δ, evalm K∆P K∆ :
> plot X z0 2 , z0 = 0 ..L, gridlines, color = red ;
60000

40000

20000

0
200 400 600 800 1000
z0
K20000

K40000
> z01 d fsolve X z0 2 = 0, z0, 0 ..200 ; z02 d fsolve X z0 2 = 0, z0, 700 ..900 ;
z01 d 148.2371878
z02 d 803.5497940 (1)
> Mtp1 z, z0 d MP z, z0 Cadd X z0 k $MX12 z k , k = 1 ..2 :
> δ2 d δx 1, 1 :
> ∆P2 d ∆Px 1 :
∆P2
> X2 z0 dK :
δ2
> Mtp2 z, z0 d MP z, z0 CX2 z0 $MX12 z 1 :
> Mtp z, z0 d piecewise 0 % z0 % z01 or z02 % z0 % L , Mtp2 z, z0 , z01 ! z0 ! z02,
Mtp1 z, z0 :
> VA z0 d piecewise 0 % z0 % z01 or z02 % z0 % L , X2 z0 , z01 ! z0 ! z02, X z0 1 :
> VB z0 d piecewise z01 ! z0 ! z02, X z0 2 :
> plot VA z0 , VB z0 , z0 = 0 ..L, color = red, blue , linestyle = 1, 2 , gridlines ;
100000

80000

60000

40000

20000

0
0 200 400 600 800 1000
z0
> MtpP z0 d subs z = z0, Mtp z, z0 :
> MtpB z0 d subs z = L1, Mtp z, z0 :
> MtpC z0 d subs z = L, Mtp z, z0 :
> plot MtpP z0 , MtpB z0 , MtpC z0 , z0 = 0 ..L, color = red, blue, black , linestyle = 1, 2, 3 ,
gridlines ;

1.5 # 107

1. # 107

5. # 106

0
200 400 600 800 1000
z0
6
K5. # 10

K1. # 107

> Mmax d maximize MtpP z0 , z0 = 200 ..400, location ;


Mmax d 1.524372146 107, z0 = 292.0536947 , 1.524372146 107 (2)
> Mp1 z, z0 d piecewise z R z0,K1$ z Kz0 :
L
Mp1 z, z0 $Mtp z, z0
> Y z0 d dz :
EI z
0
>