Birds, insects, and fish all exploit the fact that flexible wings or fins generally perform better than their rigid counterparts. Given the task of designing an optimal wing, though, it is not clear how to best distribute the flexibility: Should the wing be uniformly flexible along its length, or could some advantage be gained by making certain sections more rigid than others? I will discuss this question by using a 2D small-amplitude model for the fluid-structure interaction combined with an efficient Chebyshev PDE solver. Numerical optimization shows that concentrating flexibility near the leading edge of the wing maximizes thrust production, an arrangement that resembles the torsional-joint flexibility mechanism found in insect wings. I will discuss the possibility of extending into three dimensions to address the question of optimal wing architecture more generally.