How do I take the derivative in respect to c1 for the following utility function?

u1 = log(c1) + log [1/2(x-c1-c2)]

details please

To take the derivative of the utility function u1 with respect to c1, we can use the chain rule. The chain rule states that if we have a function h(g(x)), then the derivative of h with respect to x is the derivative of h with respect to g multiplied by the derivative of g with respect to x.

In our case, the utility function u1 can be seen as the sum of two functions: log(c1) and log[1/2(x-c1-c2)]. To find the derivative with respect to c1, we need to find the derivative of each term separately.

Let's start with the first term, log(c1). The derivative of log(c1) with respect to c1 is simply 1/c1.

Now, let's move on to the second term, log[1/2(x-c1-c2)]. To take the derivative of this term with respect to c1, we can use the chain rule. Let's define g(c1) = 1/2(x-c1-c2). The derivative of g with respect to c1 is -1.

Now, we can apply the chain rule. The derivative of log[1/2(x-c1-c2)] with respect to c1 is equal to the derivative of log(u) with respect to u multiplied by the derivative of u with respect to c1. In this case, u = g(c1), so the derivative of log(u) with respect to u is 1/u^2. Therefore, the derivative of log[1/2(x-c1-c2)] with respect to c1 is -1/2(x-c1-c2)^2.

Finally, we can sum up the derivatives of each term:
du1/dc1 = 1/c1 - 1/2(x-c1-c2)^2

So, the derivative of the utility function u1 with respect to c1 is 1/c1 - 1/2(x-c1-c2)^2.