# Finding the conditional input demand function

Find the conditional input demand function and cost function for the given production function $$f(a,b,c,d)=\min\{ a,2b\} + \max\{3c,4d\}$$

In The solution, The production function is defined as $$f(x,y)=x+y$$ which is perfect substitutes.

Therefore, when $$P_x >P_y$$, $$x=q$$ and $$y=0$$. And when $$P_x < P_y$$, $$y=q$$ and $$y=q$$.

So far, everything is okay. The point that I don’t understand is how to define $$P_x$$ and $$P_y$$. In the answer, these are defined as follows

$$P_x= P_a+(P_b/2)$$ and $$P_y= P_c/3$$ if $$P_d/P_c >4/3$$ and $$P_y= P_d/4$$ if $$P_d/P_c <4/3$$

Why does he sum of the prices of goods a and b to find the $$P_x$$? But while finding $$P_y$$, he separates it under a condition? What is the difference ? In short, how to define Px and Py? My question is this.

Output $$z$$ is given as $$z = x + y$$ where $$x=min(a,2b)$$ and $$y = max(3c,4d)$$.
So assume that you want $$x=12$$ then $$a=12$$ AND $$b=6$$. Since this part of the production delivers only the minimum of serveral production processes $$a$$ and $$2b$$ the producer must get insure that ALL subproductionprocesses $$a$$ and $$2b$$ deliver the minimum.
The producer therefore has to buy both $$a$$ and $$b$$ in the required amounts and therefore the price for $$x$$ is composite including both the price of $$a$$ and $$b$$.
However, when you want $$y=12$$ you must have $$12=3c$$ OR $$12=4d$$ implying that $$c=4$$ OR $$d=3$$. Since the productionprocess $$y$$ delivers the max of the subproduction processes the producer only has to make sure that AT LEAST ONE of the subproduction processes delivers the wanted amount $$y$$.
The producer will therefore always produce $$y$$ using the "cheapest" input and as dependig on input prices. The input price will therefore only depend on the factor $$c$$ or $$d$$ chosen to achieve the max.