Time to move along a path?

Let's say I have an arbitrary path from point $$A$$ to point $$B$$. A particle moves from $$A$$ to $$B$$ under the influence of gravity but also impeded by a frictional force $$\vec{F_\mu}$$. The gravitational field does work on the particle such that $$\int_a^c{\vec{F_g} \cdot \mathrm{d}\vec{x}} ~=~ W ~=~ \Delta T \tag{1} \,,$$ and on the other side because the frictional force is always parallel to the path, $$\int_a^c {\vec{F_\mu}} \, \mathrm{d}\vec{x} ~=~ -W \,.$$ So should it not be true that $$\int_a^x \left(\vec{F_g} \cdot \hat{T}-\vec{F_\mu}\right) \, \mathrm{d}x ~=~ \Delta T \tag{2}$$ is the change in kinetic energy between points $$a$$ and $$x$$ on the path? In that case, by incorporation of arclength and rearranging the kinetic energy to be in terms of velocity is it not true that $$\Delta t ~=~ \int\limits_a^b{\sqrt{\frac{1+{y'}^{2}}{\vec{F_g} \cdot \hat{T}-\vec{F_\mu}}}} \, \mathrm{d}x \tag{3} \,,$$(integrating the $$t=d/s$$ equation essentially)? If this is the case, then for the path $$y=-x+10$$, $${y'}^2 = 1$$, so $$\Delta t ~=~ \int\limits_0^{10}\sqrt{\frac{2}{\frac{F_g\sqrt{2}}{2}}} \, \mathrm{d}x ~=~ \int\limits_0^{10}{\sqrt{\frac{4}{\sqrt{2}F_g}} \, \mathrm{d}x} ~=~ 5.3723 \, \mathrm{s} \tag{4} \,.$$

This blatantly conflicts with my HS level physics answer of $$2.02 \, \mathrm{s} ,$$ which (while hastily obtained) seems more plausibly the correct answer.

Question: How can my first method be adapted to obtain the correct time for the movement to occur, and is it a proper method for more convoluted paths? Also please point out the probably obvious error which is causing this issue.

The solution in your case is:

For conservative system (no friction ) the energy $$E$$ is conserved.

$$E=T+U$$

Thus: $$E_i=E_f \mapsto T_i+U_i=T_f+U_f\tag 1$$

where $$T$$ is the kinetic energy and $$U$$ the potential energy. i; initial state and f; final state

with:

$$T=\frac{1}{2}\,m\,\vec{v}\cdot \vec{v}$$

$$U=m\,g\,y(x)$$

and

$$\vec{v}=\frac{dx}{dt}\left[ \begin {array}{c} {1}\\ \left( {\frac {d}{dx}}y \left( x \right) \right) {}\end {array} \right]$$

thus:

$$E(x,xp)=T+U=1/2\,{{\it xp}}^{2}m+1/2\, \left( {\it ys} \left( x \right) \right) ^ {2}{{\it xp}}^{2}m+mgy \left( x \right) \tag 2$$

where : $$xp=\frac{dx}{dt}$$ and $$ys=\frac{dy}{dx}$$

for the

initial state: $$x=0\,,xp=0$$ and the final state: $$x=L\,,xp=dx/dt$$ we get with equations (1)

$$E_i(0,0)=E_f\left(L,\frac{dx}{dt}\right)\tag 3$$

with equation (2) we solve equation (3) for $$dx/dt$$ and get:

$$\frac{dx}{dt}={\frac {\sqrt {2}\sqrt { \left( 1+ \left( {\it ys} \left( L \right) \right) ^{2} \right) g \left( y \left( 0 \right) -y \left( L \right) \right) }}{1+ \left( {\it ys} \left( L \right) \right) ^{2}}} \tag 4$$

we solve equation (4) for $$t(x=L)$$ and get:

$$\boxed{t(x=L)=\frac{1}{2}\,{\frac {L \left( 1+ \left( {\it ys} \left( L \right) \right) ^{2 } \right) \sqrt {2}}{\sqrt { \left( 1+ \left( {\it ys} \left( L \right) \right) ^{2} \right) g \left( y \left( 0 \right) -y \left( L \right) \right) }}}}$$

$$y(x)=-x+10$$

$$ys(x)=\frac{d y(x)}{dx}=-1$$

$$\rightarrow$$

$$t=\frac{L}{\sqrt{g\,L}}=\frac{10}{\sqrt{9.81\,,10}}\approx 1 [s]$$

Remarks:

I) If you have a friction force, to get the time $$t$$ you must solve the equation of motion (numerically) and stop the simulation when x reach the length $$L$$.

II) The general description of a path is $$x=x(s)$$ and $$y=y(s)$$ where s is the path parameter (path length), but the steps to obtain the time $$t$$ are the same.

I am fairly certain that you can't write the force as a derivative of a gradient when there exists a non-conservative force(friction here).