I have the following production function
$$f(x_1,x_2,x_3,x_4)=max\{\min\{x_1, x_2), x_3+2x_4\}\}\ge q$$
And I want to find the cost function.
What I think
(1) $P_1+P_2 <P_3$ and $P_3/P_4<1/2$
then $(x_1^*, x_2^*, x_3^*, x_4^*) =(q,q,0,0) $
Cost function is $c(q,w)=q[w_1+w_2]$
(2) $P_1+P_2 <P_4$ and $P_3/P_4>1/2$
then $(x_1^*, x_2^*, x_3^*, x_4^*) =(q,q,0,0) $
Cost function is $c(q,w)=q[w_1+w_2]$
(3) $P_1+P_2 >P_3$ and $P_3/P_4<1/2$
then $(x_1^*, x_2^*, x_3^*, x_4^*) =(0,0,q,0) $
Cost function is $c(q,w)=qw_3$
(4) $P_1+P_2 >P_4/2$ and $P_3/P_4>1/2$
then $(x_1^*, x_2^*, x_3^*, x_4^*) =(0,0,q/2,0) $
Cost function is $c(q,w)=qw_4/2$
I have no idea how to solve such a production function. But I posted what I tried. Please show me the correct solution and how to solve such a function. Thank you.