shaft deflections in mathcad Hi Guys, need your help!. I am trying to create a spreadsheet in mathcad to calculate shaft. So far, I've been able to create shear and moment diagrams for the kength of the shaft using singularity functions. Now, I am stucked in deflections and slope. I am considering Castigliano's theorem to do it without success.... Castigliano's theorem uses a Heaviside Function and dummy loads at any point on the length of the beam/shaft... First, I defined the heaviside function and then put into the moment equation but then I couldnt do the partial derivate of this equation with respect the dummy load Q, so I had to do it manually (this way the spreadsheet is no longer parametric and will create errors if I change some inputs values). Then when having all the equations to go for integration, it seems that something is undefined.. do you think there is a fancy way to do this?. At this point I am bit frustraded I don't know where the problem is.. Another thing is,