`sintheta+costheta=sqrt2`
squaring both side
`(sintheta+costheta)^2=2`
`sin^2theta+cos^2theta+2sinthetacostheta=2`
`1+2sinthetacostheta=2`
`2sinthetacostheta=1`
`(2sinthetacostheta)/cos^2theta=1/(cos^2theta)`
`2tantheta=1+tan^2theta`
`1-2tantheta+tan^2theta`
`(1-tantheta)^2=0`
`1-tantheta=0`
`tantheta=1`.