# Question:how i can reduce the runtime of the program ?

## Question:how i can reduce the runtime of the program ?

Maple 2017

hi..how i can rewrite section of this code as another form i,e ''for section''

I have a lot of line as this and runnig cise is time consuming.

is there another way to write this section in order to the runtime of the program is reduced??

thanks

 > restart;
 > with(LinearAlgebra):
 > with(VectorCalculus):
 > #Digits:=5: k:=6:
 > l:=0:
 > h:=1:
 > m:=4:
 > n:=4:
 > l1:=2*h:
 > l2:=2*h:
 > N:=0.5:
 > nu:=.3:
 > E_m:=70e9:
 > E_c:=380e9:
 > rho_m:=2702:
 > rho_c:=3800:
 > lambda_m:=nu*E_m/((1+nu)*(1-2*nu)):
 > lambda_c:=nu*E_c/((1+nu)*(1-2*nu)):
 > mu_m:=E_m/(2*(1+nu)):
 > mu_c:=E_c/(2*(1+nu)):
 > with(orthopoly):
 > for i from 0 to 5 do: L(i):=sqrt((2*i+1)/2)*P(i,z): end do:
 > Z:=rho_m+(rho_c-rho_m)*((1/2)+(z/h))^N;
 (1)
 > U:=lambda_m+(lambda_c-lambda_m)*((1/2)+(z/h))^N;
 (2)
 > S:=mu_m+(mu_c-mu_m)*((1/2)+(z/h))^N;
 (3)
 > d:=Matrix([[0,0,0,0,0,0,0,0],[sqrt(3),0,0,0,0,0,0,0],[0,sqrt(15),0,0,0,0,0,0],[sqrt(7),0,sqrt(35),0,0,0,0,0],[0,sqrt(27),0,sqrt(63),0,0,0,0],[sqrt(11),0,sqrt(55),0,sqrt(99),0,0,0],[0,sqrt(39),0,sqrt(91),0,sqrt(143),0,0],[sqrt(15),0,sqrt(75),0,sqrt(135),0,sqrt(195),0]]);
 (4)
 >

 >
 (5)