We are given the piece-wise real function
f(x)=⎩⎨⎧x5sin(x1)+5x2,0,x5cos(x1)+λx2,x<0,x=0,x>0.
Our task is to find the value of the constant λ for which the second derivative f′′(0) exists.
According to the definition of a derivative, the first derivative at zero is
f′(0)=limx→0xf(x)−f(0).
We therefore begin by computing f′(0) from the left and from the right.
Left side (x<0)
For x<0 we have f(x)=x5sin(x1)+5x2, so
xf(x)−f(0)=xx5sin(x1)+5x2−0=x4sin(x1)+5x.
Because −1≤sinθ≤1 for every real θ, the factor x4 forces the first term to 0 as x→0, and the second term 5x also tends to 0. Hence
limx→0−xf(x)−f(0)=0.
Right side (x>0)
For x>0 we have f(x)=x5cos(x1)+λx2, so
xf(x)−f(0)=xx5cos(x1)+λx2−0=x4cos(x1)+λx.
Again, the boundedness of cos and the explicit factor of x make both terms approach 0 as x→0. Thus
limx→0+xf(x)−f(0)=0.
Since both one-sided limits are equal, we have
f′(0)=0.
Next we recall the definition of the second derivative:
f′′(0)=limx→0xf′(x)−f′(0).
Therefore we now compute the first derivative away from zero and then take the above limit.
Derivative for x<0
Write g(x)=x5sin(x1). Using the product rule and the chain rule,
dxdx5sin(x1)=5x4sin(x1)+x5cos(x1)(−x21)=5x4sin(x1)−x3cos(x1).
The derivative of 5x2 is plainly 10x. Hence for x<0
f′(x)=5x4sin(x1)−x3cos(x1)+10x.
Derivative for x>0
For x5cos(x1), again apply the product and chain rules:
dxdx5cos(x1)=5x4cos(x1)+x5(−sin(x1))(−x21)=5x4cos(x1)+x3sin(x1).
The derivative of λx2 is 2λx. Consequently, for x>0
f′(x)=5x4cos(x1)+x3sin(x1)+2λx.
We now evaluate the limit that defines f′′(0) separately from the left and from the right.
Left-hand limit
For x<0, subtract f′(0)=0 and divide by x:
xf′(x)−f′(0)=x5x4sin(x1)−x3cos(x1)+10x=5x3sin(x1)−x2cos(x1)+10.
The first two terms contain factors x3 and x2, respectively, both of which drive them to 0 because sin and cos stay between −1 and 1. Therefore
limx→0−xf′(x)−f′(0)=10.
Right-hand limit
For x>0 we get
xf′(x)−f′(0)=x5x4cos(x1)+x3sin(x1)+2λx=5x3cos(x1)+x2sin(x1)+2λ.
Again the first two terms shrink to 0 as x→0, leaving
limx→0+xf′(x)−f′(0)=2λ.
For the second derivative f′′(0) to exist, the left-hand and right-hand limits must coincide; hence we require
10=2λ.
Solving immediately yields
λ=5.
So, the answer is 5.