I'm trying to calculate the maximum deflection in a simply supported member with a uniformly distributed load. The trouble is this member does not have a constant area moment of inertia. I've drawn a simplified version of the specific problem I'm trying to solve:
[![Example Model](https://i.stack.imgur.com/z6Mmn.png)](https://i.stack.imgur.com/z6Mmn.png)

I'd like to treat this problem like this case except I don't know how to account for the changing I.
[![Simple Beam - Uniformly Distributed Load](https://i.stack.imgur.com/ibULi.png)](https://i.stack.imgur.com/ibULi.png)

So clearly the maximum deflection will occur at the center, but what methods can I use to account for the changing value of I?

I see that the problem could be broken up into chunks. The back plate and the first two inches of the rib are constant along the length, and then the part that changes could be broken up into three sections. First section would be the increasing slope of the rib, second section is the long constant portion of the rib, and the third section is the decreasing slope of the rib. I've found examples online about how to deal with connected beams of different I values, but the issue here is I changes as you go along the length for sections one and three.

I've found a guide [here](https://mentoredengineer.com/determining-deflection-in-variable-cross-section-beams/) that gives the formula v"=M(x)/(EI(x)) and then you integrate and solve for boundary conditions, but my I value is more complicated than the first two examples on that site.

I've also tried to look into Castigliano's Theorem but I'm already a bit confused without even getting into the fact that M and I are both dependent on x.

The actual geometry of the part I'm working with is slightly more complicated than the example I've given, but I think I'd be able to adapt the solution for this problem to my actual problem. I'd like to solve this problem using Excel or MATLAB/Octave because there are other sizes I need to solve for. Ultimately, I need to use this solution process to optimize for an ideal rib length which is why I plan to use Excel or MATLAB/Octave. I have access to ANSYS Mechanical, but my intuition tells me once I figure out how to solve this, future calculations would be done much quicker in Excel or MATLAB/Octave instead of ANSYS.

Any tips or ideas of how to approach this would be very appreciated. Thank you.