# Math Help - Find the perimeter of a triangle inside a square.

1. ## Find the perimeter of a triangle inside a square.

I'm not entirely sure if this is in the right forum, I thought you would have to use some Trig functions to solve it but no one in the trig forums is responding. Also, the link below is to the drawing of the problem but the written portion is as follows:

Suppose a square ABCD has side length 1. If triangle APQ is inscribed in the square such that angle PAQ has measure 45 degrees, find the perimeter of triangle CPQ.

The picture:
imgur: the simple image sharer

Well, I can get you started, but you will have to work out the algebra. Arbitrarily define $x=DP$ and $y=CQ$. Using Pythagoras, $a=AP=\sqrt{x^2+1}, b=AQ=\sqrt{y^2+1}, c=PQ=\sqrt{(x-1)^2+(y-1)^2}$. Then using the Law of Cosines, you can find $y$ as a function of $x$. Plug this back in to your perimeter $CPQ=(1-x) + (1-y) + \sqrt{(x-1)^2+(y-1)^2}$ and reduce. (Hint: consider when $x=0, y=1$, the triangle $APQ$ is exactly $ADC$, what is the perimeter of $CPQ$ then?)