# Solve for ##c## for this rotated square

• B
• erobz
In summary: The rotation matrix for counterclockwise rotation about the origin is:\begin{pmatrix} -1 & -|x| \\ 0 & c \end{pmatrix}
erobz
Homework Helper
Gold Member

I'm getting a quartic in ##c##, is there a way around that...perhaps something elegant I'm missing?

ChiralSuperfields
At 45 degrees, c is h/sqrt(2)
At 0 and 90 it's 0.
Seems cos(theta-45degrees)h/sqrt(2) to me

.Scott said:
At 45 degrees, c is h/sqrt(2)
At 0 and 90 it's 0.
Seems sin(theta)h/sqrt(2) to me

Well, a quartic can't be sinusoidal?

I have the following system from the variables shown the diagram:

$$( c + y )^2 = \left( \frac{h}{2}+ z\right)^2 + \frac{h^2}{4}$$

$$c^2 + x^2 = \frac{h^2}{2}$$

$$z^2 = x^2 + y^2$$

$$\frac{y}{x}= \tan \theta$$

I solved the system for ##\theta = 60°## ( it was a good bit of algebra, and I was thinking about a particular ##\theta## originally):

$$16c^4 - 8 \sqrt{3} h c^3 - 6 h^2c^2 + 4 \sqrt{3}h^3 c - h^4 = 0$$

Perhaps I don't understand what you are trying to do.
It seems to me that given h and theta, everything else (including Z and C) can be computed.
What are you taking as the givens.

.Scott said:
Perhaps I don't understand what you are trying to do.
It seems to me that given h and theta, everything else (including Z and C) can be computed.
What are you taking as the givens.
##h## and ##\theta## are the parameters. All those other variables ##y,x,z## are just intermediate variables to define the triangles which make up the system of equations.

The goal is to solve for ##c##, given ##h##, and ##\theta##. Unless I've messed up that results in a quartic polynomial in the variable ##c##.

Okay. So if you take the center of that square as your X,Y origin as well as the center of rotation, then the top of C is a point that simply follows a circle and the length of c is the y coordinate of that point.

.Scott said:
Okay. So if you take the center of that square as your X,Y origin as well as the center of rotation, then the top of C is a point that simply follows a circle and the length of c is the y coordinate of that point.

Like this:

The one on the left ##\theta = 90° , c = \frac{h}{2}## , and the one on the right ##\theta = 60°, c= ?##

##c## is always the maximum vertical distance from the horizontal axis to a point on the square for a particular angle.

If I solved the system, the one on the right is given by:

$$16c^4 - 8 \sqrt{3} h c^3 - 6 h^2c^2 + 4 \sqrt{3}h^3 c - h^4 = 0$$

Last edited:
erobz said:
Like this:

View attachment 323821The one on the left ##\theta = 90° , c = \frac{h}{2}## , and the one on the right ##\theta = 60°, c= ?##
Except in your left square, I would have drawn line segment 'c' from the top left corner point of the square down to the x-axis. That way, as the square continues to rotate counter-clockwise, it's still easy to tract 'C'. Also in both frames, I would start with a line segment that crosses through the origin and has a slope of 1. Then you can mark the angle between that 45-degree segment and the diagonal that goes to the top of C as theta.

Also, I tried to merge my ##cos(pi/4-\theta)h/\sqrt 2## into your equation - but Wolfram Alpha gave out on me.

Last edited:
.Scott said:
Except in your left square, I would have drawn line segment 'c' from the top left corner point of the square down to the x-axis. That way, as the square continues to rotate counter-clockwise, it's still easy to tract 'C'. Also in the left frame, you left out the theta. It should go all the way to that diagonal line segment.
I'm confused. The angle I have labeled is ##\theta## in both diagrams. It's referenced from horizontal, it represents the angle the right side of the square makes w.r.t. horizontal.

.Scott said:
Also, I tried to merge my ##cos(pi/4-\theta)h/\sqrt 2## into your equation - but Wolfram Alpha gave out on me.
Well, they couldn't possibly work together because wouldn't that imply ##\cos \beta ## is algebraic?
The only polynomial that converges to ##\cos \beta ## is a Power Series as far as I know.

A bit messy - but I measuring theta from that x=y segment
Theta is 90 degrees on the left panel. It's about 60 on the right.
The point is that theta+pi/4 is the angle from x,y=1,0 to the top of C.

Last edited:
erobz said:
View attachment 323817

I'm getting a quartic in ##c##, is there a way around that...perhaps something elegant I'm missing?

Rotating a square with vertices at $(\pm \frac12 h, \pm \frac12h)$ counterclockwise through an angle of $\theta \in [\frac14 \pi, \frac34 \pi]$ about its centre $(0,0)$ will move the vertex at $(\frac12h , \frac12 h)$ to what you have as $(-|x|,c)$. This is a linear transformation, so we should have $c = f(\theta)h$ for some $f(\theta)$.

To calculate $(-|x|, c)$, we can use a rotation matrix: $$\begin{pmatrix} -|x| \\ c \end{pmatrix} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} \begin{pmatrix} \tfrac12 h \\ \frac12 h \end{pmatrix}.$$ Hence $$c = \tfrac12 h (\sin \theta + \cos \theta) = \frac{h}{\sqrt{2}} \cos\left(\theta - \frac\pi{4}\right).$$

pasmith said:
Rotating a square with vertices at $(\pm \frac12 h, \pm \frac12h)$ counterclockwise through an angle of $\theta \in [\frac14 \pi, \frac34 \pi]$ about its centre $(0,0)$ will move the vertex at $(\frac12h , \frac12 h)$ to what you have as $(-|x|,c)$. This is a linear transformation, so we should have $c = f(\theta)h$ for some $f(\theta)$.

To calculate $(-|x|, c)$, we can use a rotation matrix: $$\begin{pmatrix} -|x| \\ c \end{pmatrix} = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix} \begin{pmatrix} \tfrac12 h \\ \frac12 h \end{pmatrix}.$$ Hence $$c = \tfrac12 h (\sin \theta + \cos \theta) = \frac{h}{\sqrt{2}} \cos\left(\theta - \frac\pi{4}\right).$$
Can you (anyone) find which equation in the system in post #3 is not true? Surely, I've bungled one of them ( atleast)? And they seem so straight forward its driving me bonkers... I've updated the diagram to be more clear, and just reposted the system.

$$( c + y )^2 = \left( \frac{h}{2}+ z\right)^2 + \frac{h^2}{4} \tag{1}$$

$$c^2 + x^2 = \frac{h^2}{2}\tag{2}$$

$$z^2 = x^2 + y^2 \tag{3}$$

$$\frac{y}{x}= \tan \theta \tag{4}$$

Last edited:
.Scott said:
View attachment 323823

A bit messy - but I measuring theta from that x=y segment
Theta is 90 degrees on the left panel. It's about 60 on the right.
The point is that theta+pi/4 is the angle from x,y=1,0 to the top of C.
I see how it works out, thanks for taking the time to explain that. I agree with what you are saying.

I'm just perplexed at what has gone haywire in what I initially started with.

erobz said:
Can you (anyone) find which equation in the system in post #3 is not true? Surely, I've bungled one of them ( atleast)? And they seem so straight forward its driving me bonkers... I've updated the diagram to be more clear, and just reposted the system.

I think these are correct. I just don't think they help you. Eliminating $x = z\cos\theta$ and $y = z \sin \theta$ leads you to a system in $c$ and $z$, but it's not an easy system to solve.

The triangle you care about is the one with sides $c$, $x$ and $h/\sqrt{2}$. This is a right-angled triangle, and you can work out the angle $\alpha$ of this triangle at the centre of the square: clearly $\alpha + \theta + \frac \pi 4 = \pi$. Hence $$c = \frac{h}{\sqrt{2}} \sin \left(\pi - \theta - \frac \pi 4\right).$$ This simplifies to the expression $\frac12h(\sin \theta + \cos \theta)$ I gave earlier.

Last edited:
erobz
pasmith said:
I think these are correct. I just don't think they help you. Eliminating $x = z\cos\theta$ and $y = z \sin \theta$ leads you to a system in $c$ and $z$, but it's not an easy system to solve.

The triangle you care about is the one with sides $c$, $x$ and $h/\sqrt{2}$. This is a right-angled triangle, and you can work out the angle $\alpha$ of this triangle at the centre of the square: clearly $\alpha + \theta + \frac \pi 4 = \pi$. Hence $$c = \frac{h}{\sqrt{2}} \sin \left(\pi - \theta - \frac \pi 4\right).$$ This simplifies to the expression $\frac12h(\sin \theta + \cos \theta)$ I gave earlier.
What I don't understand is when is solve the system I'm getting a quartic in ##c##. If that were the case, it means that the solution of some quartic is ##\cos \beta##. Is that possible?

erobz said:
Can you (anyone) find which equation in the system in post #3 is not true?
It looks right to me. I observed that the line N.A. is ##c## above the bottom corner from symmetry, and hence by inspection of the vertical extent of two sides of the square ##2c=h(\sin\theta+\cos\theta)##. You can plug this, with ##\theta=60°##, into your quartic and show that it's a solution. Factoring out that solution gives you a cubic, the solutions to which are ##c=\pm h/\sqrt 2## and ##c=(\sqrt{3}-1)h/4##.

Writing the quartic with a general ##\theta## and noting that it looks like two of the solutions are ##c=(\sin\theta\pm\cos\theta)/2## might be helpful in figuring out what's going on with it.

Last edited:
erobz
erobz said:
View attachment 323817

I'm getting a quartic in ##c##, is there a way around that...perhaps something elegant I'm missing?
I like you diagrams @erobz! What software to do you use to create you diagrams?

Many thanks!

Expand (1) and clear fractions:

$$2c^2 + 4c y + 2y^2 = h^2+ 2hz + 2z^2$$

Substitute (3) for ##z## and ##z^2##

$$2c^2 + 4c y + 2y^2 = h^2+ 2h\sqrt{x^2+y^2} + 2 \left( x^2 + y^2\right)$$

Then sub (4) to eliminate ##y##:

$$2c^2 + 4c x \tan \theta + 2x^2 \tan^2 \theta = h^2+ 2h\sqrt{x^2+x^2 \tan^2 \theta} + 2 \left( x^2 + x^2 \tan^2 \theta\right)$$

$$\implies 2c^2 + 2\left( 2c \tan \theta -h \sec \theta \right)x -2x^2 -h^2 = 0$$

Then sub(2) to eliminate ##\implies x^2 = \frac{h^2}{2} - c^2##:

$$2c^2 + 2\left( 2c \tan \theta -h \sec \theta \right)\sqrt{\frac{h^2}{2} - c^2} -2\left( \frac{h^2}{2} - c^2 \right) -h^2 = 0$$

Then Expand, collect like terms and isolate the root and square both sides:

$$\left[ 2 \left( 2c \tan \theta -h \sec \theta\right) \sqrt{\frac{h^2}{2} - c^2} \right]^2 = \left( 2h^2 -4c^2 \right)^2$$

If you expand all that I get a quartic. The solution proposed indicates indicated that a zero of the quartic is ## \frac{h}{\sqrt{2}} \cos \left( \theta - \frac{\pi}{4} \right)##.

I don't know why I was thinking that would imply that the cosine function could be expressed as a polynomial. I'm sorry if I had everyone scratching their heads trying to figure out what I was getting at...I think I was just terribly confused.

Last edited:
Callumnc1 said:
I like you diagrams @erobz! What software to do you use to create you diagrams?

Many thanks!
Thanks! Thats Power Point.

ChiralSuperfields
erobz said:
Thanks! Thats Power Point.

Wow, I didn't know that it could be used to produce such great diagrams! I might try using it then.

Many thanks!

Callumnc1 said:

Wow, I didn't know that it could be used to produce such great diagrams! I might try using it then.

Many thanks!
It takes practice. It's not designed specifically for mathematical diagrams, but you can get by with it. If there is anything that is geometrically heavy I just draft it in an actual CAD software first, then bring it over as a picture and mark it up.

ChiralSuperfields
erobz said:
It takes practice. It's not designed specifically for mathematical diagrams, but you can get by with it. If there is anything that is geometrically heavy I just draft it in an actual CAD software first, then bring it over as a picture and mark it up.
Thank you for letting me know @erobz!

erobz
erobz said:
$$2c^2 + 2\left( 2c \tan \theta -h \sec \theta \right)\sqrt{\frac{h^2}{2} - c^2} -2\left( \frac{h^2}{2} - c^2 \right) -h^2 = 0$$

Then Expand, collect like terms and isolate the root and square both sides:

$$\left[ 2 \left( 2c \tan \theta -h \sec \theta\right) \sqrt{\frac{h^2}{2} - c^2} \right]^2 = \left( 2h^2 -4c^2 \right)^2$$

If you expand all that I get a quartic.

But it factorises as two quadratics.

Leave $2h^2 -4c^2$ as $4\left(\frac{h^2}2 - c^2\right)$. A factor of 2 can then be cancelled, and, after squaring, both sides will have a factor $\left(\frac{h^2}2 - c^2\right)$. Assuming this factor is non-zero, we can cancel it to get a quadratic $$4\left( \frac{h^2}2 - c^2 \right) = (2c\tan\theta - h\sec\theta)^2.$$ Expanding this and simplifying some trig functions we get $$4c^2\sec^2\theta - 4ch\sec\theta \tan\theta + h^2 \sec^2 \theta - 2h^2 = 0$$ and multiplying by $\cos^2\theta$ we get $$\begin{split} 0 &= 4c^2 - 4ch\sin \theta + h^2 - 2h^2 \cos^2 \theta \\ &= 4c^2 - 4ch\sin \theta + h^2 \sin^2 \theta - h^2 \cos^2 \theta \\ &= (2c - h\sin\theta)^2 - h^2 \cos^2 \theta. \end{split}$$ Thus we have the four roots $$\frac{h}{\sqrt 2}, \quad -\frac{h}{\sqrt 2},\quad \frac{h(\sin \theta + \cos \theta)}{2},\quad \frac{h(\sin \theta - \cos \theta)}{2}.$$

SammyS
pasmith said:
But it factorises as two quadratics.

Leave $2h^2 -4c^2$ as $4\left(\frac{h^2}2 - c^2\right)$. A factor of 2 can then be cancelled, and, after squaring, both sides will have a factor $\left(\frac{h^2}2 - c^2\right)$. Assuming this factor is non-zero, we can cancel it to get a quadratic $$4\left( \frac{h^2}2 - c^2 \right) = (2c\tan\theta - h\sec\theta)^2.$$ Expanding this and simplifying some trig functions we get $$4c^2\sec^2\theta - 4ch\sec\theta \tan\theta + h^2 \sec^2 \theta - 2h^2 = 0$$ and multiplying by $\cos^2\theta$ we get $$\begin{split} 0 &= 4c^2 - 4ch\sin \theta + h^2 - 2h^2 \cos^2 \theta \\ &= 4c^2 - 4ch\sin \theta + h^2 \sin^2 \theta - h^2 \cos^2 \theta \\ &= (2c - h\sin\theta)^2 - h^2 \cos^2 \theta. \end{split}$$ Thus we have the four roots $$\frac{h}{\sqrt 2}, \quad -\frac{h}{\sqrt 2},\quad \frac{h(\sin \theta + \cos \theta)}{2},\quad \frac{h(\sin \theta - \cos \theta)}{2}.$$
Thanks for sharing! I wouldn't have thought of that...just not good enough.

## 1. What is the formula for finding the value of c in a rotated square?

The formula for solving for c in a rotated square is c = √(a² + b²), where a and b are the side lengths of the square.

## 2. How do you determine the value of c in a rotated square?

To determine the value of c in a rotated square, you need to know the side lengths of the square and use the formula c = √(a² + b²).

## 3. Can you solve for c in a rotated square without knowing the side lengths?

No, you cannot solve for c in a rotated square without knowing the side lengths. The formula c = √(a² + b²) requires the values of a and b to be known.

## 4. Is there a different formula for finding c in a rotated square?

No, there is only one formula for solving for c in a rotated square, which is c = √(a² + b²).

## 5. What does the value of c represent in a rotated square?

The value of c represents the length of the diagonal of the rotated square, which is also the hypotenuse of the right triangle formed by the two sides of the square.

• General Math
Replies
1
Views
1K
• General Math
Replies
7
Views
545
• General Math
Replies
2
Views
1K
• General Math
Replies
10
Views
1K
• General Math
Replies
3
Views
3K
• General Math
Replies
4
Views
816
• General Math
Replies
2
Views
754
• General Math
Replies
2
Views
1K
• General Math
Replies
45
Views
3K
• General Math
Replies
7
Views
994