Finding the Value of K in an Integral Function

9.4k Views Asked by At

Given the function $$f(x)\begin{cases} -2(x+1), & \text{x $\le0$} \\ k(1-x^2), & \text{x $\gt0$} \\ \end{cases}$$

Find the value of k for $$\int_{-1}^1f(x)dx=1$$

Wasn't really sure how to do this but this is what I did:

Integrate first function from -1 to 0:

$$\int_{-1}^0-2(x+1)=-1$$

Second Integral:

$$\int_0^1k(1-x^2) = 2$$ $$= \left[kx-\frac{kx^3}{3}\right]_0^1=2$$ $$k-\frac{k}{3}=2$$ $$\frac{2}{3}k=2$$ $$k=3$$

So therefore k must be 3 for $\int_{-1}^1f(x)dx=1$

Is this correct?

2

There are 2 best solutions below

3
On BEST ANSWER

The first integral is incorrect:

$$\int_{-1}^0-2(x+1)$$

$$\left[-x^2 - 2x\right]_{-1}^0$$

$$0-(-1+2) = -1$$

EDIT

The OP made an error within the question. His work and answer are both correct now.

2
On

Looks fine. Indeed it is $-3$. Please care about the continuously of the function on the given interval, however it doesn't need here. A simple code in Maple could get us that $k$:

[> f := x->(-1 <= x and x <= 0, -2*x-2, 0 < x and x <= 1, 3-3*x^2):
solve(int(f(x), x = -1 .. 1) = 1, k);


                                        3