# Rearranging an equation. A big equation.

• Mar 31st 2014, 03:20 AM
Rearranging an equation. A big equation.
Attachment 30570

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

• Mar 31st 2014, 03:33 AM
romsek
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?
• Mar 31st 2014, 04:32 AM
Re: Rearranging an equation. A big equation.
Quote:

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.

• Mar 31st 2014, 04:58 AM
romsek
Re: Rearranging an equation. A big equation.
Quote:

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.
• Mar 31st 2014, 05:45 AM
Re: Rearranging an equation. A big equation.
Quote:

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

• Mar 31st 2014, 08:00 AM
Re: Rearranging an equation. A big equation.
Quote:

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?

• Mar 31st 2014, 11:47 AM
romsek
Re: Rearranging an equation. A big equation.
Quote:

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$.
• Mar 31st 2014, 05:09 PM
SlipEternal
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)$.
• Apr 1st 2014, 12:04 AM
Re: Rearranging an equation. A big equation.
Quote:

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$.
• Apr 1st 2014, 12:46 PM
JeffM
Re: Rearranging an equation. A big equation.
Is r both the arc length and the radius of the corresponding circle?
• Apr 1st 2014, 11:51 PM