derivatives:

y=(x^3+1)^2, then dy/dx is:

i got 6x^2(x^3+1) first but im not sure.
Can i see the steps of how it is done right. I also got 2(3x^2+1), which one is right??

sorry for bugging.Thanks

y=(x^3+1)^2, then dy/dx is:

i got 6x^2(x^3+1) first but im not sure.
Can i see the steps of how it is done right. I also got 2(3x^2+1), which one is right??
-----------------------------------
y' = 2(x^3+1)^1 dy/dx (x^3)

= 2 (x^3+1)(3)(x^2)

= 6 x^2 (x^3+1)