Solve equations using structure