correctI am working on my homework and am asked to sketch the graph of the piecewise function

f(x) = x^3 if x ≤ 0

2x if x > 0

Once I sketch the function I see that the function will not be differentiable at x =0because the graph has a "corner" there and is not a smooth function. I am also asked to find f prime for the piecewise function and I get the following

f'((x) = 3x^2 if x < 0

2 if x > 0

I am wondering if I have worked this problem correctly. Thanks