Composite functions and solving for variables