We want to maximize U(x,y) subject to the constraint M = px + qy, where M is monetary income and p,q are the prices of x and y respectively. Since this is a constrained optimization problem we can use the lagrange multiplier method. First we form the lagrangianL (x,y,λ) = ln(x) + ln(y) +λ(M -px -qy)and obtain the first order conditions by partial differentiation and set them equal to zero. The reason we do this is that the derivative equal to zero identifies the points where the function attains a stationary point (that is, a maximum or a minimum)1) Lx = 1/x -λp = 0 => λ = 1/px2) Ly = 1/y -λq = 0 => λ = 1/qy3) Lλ = M -px -qy = 0 Equating 1) and 2) we find x as a function of yx = q/p yand replacing the x in 3) and solving for y we obtain the demand functiony* (M,q) = M/2q and by simmetry we get x* (M,p) = M/2p.The demand functions tell us how the optimal choice of the consumer changes as the monetary income or the prices changes. In particular, the choice of each good decreases in their price and increases in the income. Notice how given this particular utility function the price of one good doesn't affect directly the choice of the other.