# Thread: Rearranging an equation. A big equation.

1. ## Rearranging an equation. A big equation.

Hello,

I am working on a project, and I have an equation that i need to rearrange in terms of x. The equation:

z = x (r sqrt(1-x^2/(4 r^2))-r+y)+0.5 r^2 (2 sin^(-1)(x/(2 r))-sin(2 sin^(-1)(x/(2 r))))
Which is the area of the given shape (basically a rectangle with a sector spliced on top).

Tried to input in to Wolframalpha, but ran out of computational time, and I have since ran out of talent!

Any help would be much appreciated!

Regards

2. ## Re: Rearranging an equation. A big equation.

It's very doubtful there's a closed form solution for x in terms of z, r, and y.

What are you actually trying to do? Can't you just solve it numerically?

3. ## Re: Rearranging an equation. A big equation.

Originally Posted by romsek
It's very doubtful there's a closed form solution for x in terms of z, r, and y.

What are you actually trying to do? Can't you just solve it numerically?
We are standardising a design document for shape such as that. The aim is to maintain a given area without compromising the y value.

The aim is to dictate that if z,r and y are known, we can use an equation to find what x should be.

Thanks for taking a look though. Might need to change my approach.

4. ## Re: Rearranging an equation. A big equation.

We are standardising a design document for shape such as that. The aim is to maintain a given area without compromising the y value.

The aim is to dictate that if z,r and y are known, we can use an equation to find what x should be.

Thanks for taking a look though. Might need to change my approach.

I might have something for you.

If you redo the drawing a bit.

Let $x_2$ be the height of your shape up to the point of the circular sector.

Then let

$h=y-x_2$

According to this

The area of the circular segment is given by

$a_{seg}=r^2 \cos ^{-1}\left(\dfrac{r-h}{r}\right)-(r-h) \sqrt{2 h r-h^2}$

The rectangular area is just

$a_{rect}=x x_2$ so the total area is

$\large z=a_{rect}+a_{seg}=r^2 \cos ^{-1}\left(\frac{r-h}{r}\right)-(r-h) \sqrt{2 h r-h^2}+ x x_2$

Solving this equation in terms of x I get

$x=\frac{z+r^2 \left(-\cos ^{-1}\left(\frac{r+x_2-y}{r}\right)\right)+r \sqrt{-(x_2-y) (2 r+x_2-y)}-y \sqrt{-(x_2-y) (2 r+x_2-y)}+x_2 \sqrt{-(x_2-y) (2 r+x_2-y)}}{x_2}$

I'd double and triple check this but it's possible that it will work.

5. ## Re: Rearranging an equation. A big equation.

Originally Posted by romsek
I might have something for you.

If you redo the drawing a bit.

Let $x_2$ be the height of your shape up to the point of the circular sector.

Then let

$h=y-x_2$

According to this

The area of the circular segment is given by

$a_{seg}=r^2 \cos ^{-1}\left(\dfrac{r-h}{r}\right)-(r-h) \sqrt{2 h r-h^2}$

The rectangular area is just

$a_{rect}=x x_2$ so the total area is

$\large z=a_{rect}+a_{seg}=r^2 \cos ^{-1}\left(\frac{r-h}{r}\right)-(r-h) \sqrt{2 h r-h^2}+ x x_2$

Solving this equation in terms of x I get

$x=\frac{z+r^2 \left(-\cos ^{-1}\left(\frac{r+x_2-y}{r}\right)\right)+r \sqrt{-(x_2-y) (2 r+x_2-y)}-y \sqrt{-(x_2-y) (2 r+x_2-y)}+x_2 \sqrt{-(x_2-y) (2 r+x_2-y)}}{x_2}$

I'd double and triple check this but it's possible that it will work.
Thanks, I'll give it a try. I'll let you know of the outcome

6. ## Re: Rearranging an equation. A big equation.

Originally Posted by romsek
I might have something for you.

If you redo the drawing a bit.

Let $x_2$ be the height of your shape up to the point of the circular sector.

Then let

$h=y-x_2$

According to this

The area of the circular segment is given by

$a_{seg}=r^2 \cos ^{-1}\left(\dfrac{r-h}{r}\right)-(r-h) \sqrt{2 h r-h^2}$

The rectangular area is just

$a_{rect}=x x_2$ so the total area is

$\large z=a_{rect}+a_{seg}=r^2 \cos ^{-1}\left(\frac{r-h}{r}\right)-(r-h) \sqrt{2 h r-h^2}+ x x_2$

Solving this equation in terms of x I get

$x=\frac{z+r^2 \left(-\cos ^{-1}\left(\frac{r+x_2-y}{r}\right)\right)+r \sqrt{-(x_2-y) (2 r+x_2-y)}-y \sqrt{-(x_2-y) (2 r+x_2-y)}+x_2 \sqrt{-(x_2-y) (2 r+x_2-y)}}{x_2}$

I'd double and triple check this but it's possible that it will work.
Is there a method of finding $x_2$ or $y$ without first referencing $x$?
Or am I just being dense?

7. ## Re: Rearranging an equation. A big equation.

Is there a method of finding $x_2$ or $y$ without first referencing $x$?
Or am I just being dense?

it's your shape. You said you are given $y$. I assume you know where the rectangular portion of your shape ends and where the circular sector part begins. That height is $x_2$.

If $x_2$ is not known ahead of time it can be calculated from $x$ and $r$.

8. ## Re: Rearranging an equation. A big equation.

Take partial derivatives with respect to $r$, $y$, and $z$, then use some approximation method (maybe Newton's Method might work) to find an approximation of $x(r,y,z)$.

9. ## Re: Rearranging an equation. A big equation.

Originally Posted by romsek
it's your shape. You said you are given $y$. I assume you know where the rectangular portion of your shape ends and where the circular sector part begins. That height is $x_2$.

If $x_2$ is not known ahead of time it can be calculated from $x$ and $r$.
I think I might not have been clear in my brief. The aim was to derive the $x$ dimension from the known values of $y$,$r$ & $z$.

10. ## Re: Rearranging an equation. A big equation.

Is r both the arc length and the radius of the corresponding circle?

11. ## Re: Rearranging an equation. A big equation.

Originally Posted by JeffM
Is r both the arc length and the radius of the corresponding circle?
r Is just the arc radius. Chord length is equal to x, arc length is equal to rØ, Ø being the internal angle.