What is wrong with this differentiation?

1. Jul 7, 2011

pc2-brazil

1. The problem statement, all variables and given/known data
Find dy/dt, given:
$$y=x^2-5x+1$$
$$x=s^3-2s+1$$
$$s=\sqrt{t^2+1}$$

2. The attempt at a solution
I am trying to use the chain rule for the case where y is a function of x, x is a function of s and s is a function of t, like below:
$$\frac{dy}{dt}=\frac{dy}{dx}\frac{dx}{ds}\frac{ds}{dt}$$
So:
$$\frac{dy}{dt}=(2x-5)(3s^2-2)(\frac{t}{\sqrt{t^2+1}})$$
But this gives (substituting x and s for their values as functions of t)
$$6t^5-4t^3-\frac{3t}{\sqrt{t^2+1}}-\frac{9t^3}{\sqrt{t^2+1}}-2t$$
which is not the correct result. The correct result is:
$$6t^5-4t^3-9t\sqrt{t^2+1}+\frac{6t}{\sqrt{t^2+1}}-2t$$
What is wrong?

$$-9t\sqrt{t^2+1}+\frac{6t}{\sqrt{t^2+1}}$$
$$-9t\sqrt{t^2+1}+\frac{6t}{\sqrt{t^2+1}}=\frac{-9t(t^2+1)+6t}{\sqrt{t^2+1}}=\frac{-9t^3-3t}{\sqrt{t^2+1}}$$