# Desired Z axis and Yaw to ZXY Euler Angles?

I'm trying to calculate a desired pair of pitch and roll Euler angles (the XY in ZXY format) given a desired z-axis of the rotated frame (expressed in the world frame) and a specified yaw angle (rotation about the Z axis).

I've played around with the math but I can't seem to get a nice expression for them. Any ideas?

-