### How to tell to sagemath to solve for the good root

Hello, this is a simple problem of optimization

%display latex

var('w, gamma, alpha, beta, h, theta,
p, A, B'); U= w^(gamma); Pi =
p*h^(theta)- w*h; N= (U)^alpha *
(Pi-B)^beta show(U) show(Pi) show(N)
show(N_w)
N_w= factor(N.diff(w))
assume(0 < alpha <1)
assume(0 < beta <1)
z=solve(N_w==0, w, solution_dict=True)
show(z)

If I say no bulshit, with the assumptions only one solution is valid. But Sagemath display all solutions ? How could it be done automaticaly ?

The factoriZation shows that

assume(0 < alpha <1) assume(0 < beta
<1) z=solve(N_w==0, w,
solution_dict=True)