Solve for ##c## for this rotated square

  • B
  • Thread starter erobz
  • Start date
  • Tags
    Square
In summary: The rotation matrix for counterclockwise rotation about the origin is:\begin{pmatrix} -1 & -|x| \\ 0 & c \end{pmatrix}
  • #1
erobz
Homework Helper
Gold Member
3,612
1,499
1679234157586.png


I'm getting a quartic in ##c##, is there a way around that...perhaps something elegant I'm missing?
 
  • Like
Likes ChiralSuperfields
Mathematics news on Phys.org
  • #2
At 45 degrees, c is h/sqrt(2)
At 0 and 90 it's 0.
Seems cos(theta-45degrees)h/sqrt(2) to me
 
  • #3
.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 $$
 
  • #4
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.
 
  • #5
.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##.
 
  • #6
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.
 
  • #7
.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:

1679240792382.png
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:
  • #8
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:
  • #9
.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.

1679241839748.png
 
  • #10
.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.
 
  • #11
squares.png


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:
  • #12
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 [itex](\pm \frac12 h, \pm \frac12h)[/itex] counterclockwise through an angle of [itex]\theta \in [\frac14 \pi, \frac34 \pi][/itex] about its centre [itex](0,0)[/itex] will move the vertex at [itex](\frac12h , \frac12 h)[/itex] to what you have as [itex](-|x|,c)[/itex]. This is a linear transformation, so we should have [itex]c = f(\theta)h[/itex] for some [itex]f(\theta)[/itex].

To calculate [itex](-|x|, c)[/itex], we can use a rotation matrix: [tex]
\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}.[/tex] Hence [tex]
c = \tfrac12 h (\sin \theta + \cos \theta) = \frac{h}{\sqrt{2}} \cos\left(\theta - \frac\pi{4}\right).[/tex]
 
  • #13
pasmith said:
Rotating a square with vertices at [itex](\pm \frac12 h, \pm \frac12h)[/itex] counterclockwise through an angle of [itex]\theta \in [\frac14 \pi, \frac34 \pi][/itex] about its centre [itex](0,0)[/itex] will move the vertex at [itex](\frac12h , \frac12 h)[/itex] to what you have as [itex](-|x|,c)[/itex]. This is a linear transformation, so we should have [itex]c = f(\theta)h[/itex] for some [itex]f(\theta)[/itex].

To calculate [itex](-|x|, c)[/itex], we can use a rotation matrix: [tex]
\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}.[/tex] Hence [tex]
c = \tfrac12 h (\sin \theta + \cos \theta) = \frac{h}{\sqrt{2}} \cos\left(\theta - \frac\pi{4}\right).[/tex]
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.

1679246385196.png


$$ ( 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:
  • #14
.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.
 
  • #15
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 [itex]x = z\cos\theta[/itex] and [itex]y = z \sin \theta[/itex] leads you to a system in [itex]c[/itex] and [itex]z[/itex], but it's not an easy system to solve.

The triangle you care about is the one with sides [itex]c[/itex], [itex]x[/itex] and [itex]h/\sqrt{2}[/itex]. This is a right-angled triangle, and you can work out the angle [itex]\alpha[/itex] of this triangle at the centre of the square: clearly [itex]\alpha + \theta + \frac \pi 4 = \pi[/itex]. Hence [tex]
c = \frac{h}{\sqrt{2}} \sin \left(\pi - \theta - \frac \pi 4\right).[/tex] This simplifies to the expression [itex]\frac12h(\sin \theta + \cos \theta)[/itex] I gave earlier.
 
Last edited:
  • Like
Likes erobz
  • #16
pasmith said:
I think these are correct. I just don't think they help you. Eliminating [itex]x = z\cos\theta[/itex] and [itex]y = z \sin \theta[/itex] leads you to a system in [itex]c[/itex] and [itex]z[/itex], but it's not an easy system to solve.

The triangle you care about is the one with sides [itex]c[/itex], [itex]x[/itex] and [itex]h/\sqrt{2}[/itex]. This is a right-angled triangle, and you can work out the angle [itex]\alpha[/itex] of this triangle at the centre of the square: clearly [itex]\alpha + \theta + \frac \pi 4 = \pi[/itex]. Hence [tex]
c = \frac{h}{\sqrt{2}} \sin \left(\pi - \theta - \frac \pi 4\right).[/tex] This simplifies to the expression [itex]\frac12h(\sin \theta + \cos \theta)[/itex] 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?
 
  • #17
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:
  • Like
Likes erobz
  • #18
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!
 
  • #19
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:
  • #20
Callumnc1 said:
I like you diagrams @erobz! What software to do you use to create you diagrams?

Many thanks!
Thanks! Thats Power Point.
 
  • Like
Likes ChiralSuperfields
  • #21
erobz said:
Thanks! Thats Power Point.
Thank you for your reply @erobz!

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

Many thanks!
 
  • #22
Callumnc1 said:
Thank you for your reply @erobz!

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.
 
  • Like
Likes ChiralSuperfields
  • #23
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!
 
  • Like
Likes erobz
  • #24
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 [itex]2h^2 -4c^2[/itex] as [itex]4\left(\frac{h^2}2 - c^2\right)[/itex]. A factor of 2 can then be cancelled, and, after squaring, both sides will have a factor [itex]\left(\frac{h^2}2 - c^2\right)[/itex]. Assuming this factor is non-zero, we can cancel it to get a quadratic [tex]
4\left( \frac{h^2}2 - c^2 \right) = (2c\tan\theta - h\sec\theta)^2.[/tex] Expanding this and simplifying some trig functions we get [tex]
4c^2\sec^2\theta - 4ch\sec\theta \tan\theta + h^2 \sec^2 \theta - 2h^2 = 0[/tex] and multiplying by [itex]\cos^2\theta[/itex] we get [tex]
\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}[/tex] Thus we have the four roots [tex]
\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}.[/tex]
 
  • Like
Likes SammyS
  • #25
pasmith said:
But it factorises as two quadratics.

Leave [itex]2h^2 -4c^2[/itex] as [itex]4\left(\frac{h^2}2 - c^2\right)[/itex]. A factor of 2 can then be cancelled, and, after squaring, both sides will have a factor [itex]\left(\frac{h^2}2 - c^2\right)[/itex]. Assuming this factor is non-zero, we can cancel it to get a quadratic [tex]
4\left( \frac{h^2}2 - c^2 \right) = (2c\tan\theta - h\sec\theta)^2.[/tex] Expanding this and simplifying some trig functions we get [tex]
4c^2\sec^2\theta - 4ch\sec\theta \tan\theta + h^2 \sec^2 \theta - 2h^2 = 0[/tex] and multiplying by [itex]\cos^2\theta[/itex] we get [tex]
\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}[/tex] Thus we have the four roots [tex]
\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}.[/tex]
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.

Similar threads

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