def solow_analytic_solution(t, k0, g, n, s, alpha, delta):
 lmbda = (((n + g) + delta) * (1 - alpha))
 k_t = ((((s / ((n + g) + delta)) * (1 - np.exp(((- lmbda) * t)))) + ((k0 ** (1 - alpha)) * np.exp(((- lmbda) * t)))) ** (1 / (1 - alpha)))
 analytic_traj = np.hstack((t[:, np.newaxis], k_t[:, np.newaxis]))
 return analytic_traj

def solow_analytic_solution ( t , k0 , g , n , s , alpha , delta ) : lmbda = ( ( ( n + g ) + delta ) * ( 1 - alpha ) ) k_t = ( ( ( ( s / ( ( n + g ) + delta ) ) * ( 1 - np . exp ( ( ( - lmbda ) * t ) ) ) ) + ( ( k0 ** ( 1 - alpha ) ) * np . exp ( ( ( - lmbda ) * t ) ) ) ) ** ( 1 / ( 1 - alpha ) ) ) analytic_traj = np . hstack ( ( t [ : , np . newaxis ] , k_t [ : , np . newaxis ] ) ) return analytic_traj
analytic solution for the path of capital stock .