How to fix Part::partw error

How to correct the code which produces

Part::partw
Part::partd
errors
Part::partw: Part 2 of Y[tau] does not exist.

Part::partd: Part specification {Y->InterpolatingFunction[{{-2.11454,0.}},{5,3,1,{437},{4},0,0,0,0,Automatic,{},{},False},{{-2.11454,<<49>>,<<387>>}},{{{-34.6432,8.237},{3.35084*10^11,-6.32877*10^10}},<<49>>,<<387>>},{Automatic}]}[[1,All,1,2]] is longer than depth of object.

I’m not seeing that Y or tau are defined anywhere. So, when you call ft, the first argument is Y[tau] literally. Y[[1]] resolves to tau, but there is no second element, so Y[[2]] generates the message.

The rest of the messages might just be a consequence of that first problem, but I didn’t try to debug the entire thing. Fix the first problem and see where that gets you.