having:

x + r = r/cos(b) + h*tan(b)

a = (r *tan(b) + h/cos(b) - h)/r - b

r and h are constants.

Find: b(x) and a(x)

you may find the link below helpful:

http://www.experts-exchange.com/Other/Math_Science/Q_27242530.html

Thank you.

x + r = r/cos(b) + h*tan(b)

a = (r *tan(b) + h/cos(b) - h)/r - b

r and h are constants.

Find: b(x) and a(x)

you may find the link below helpful:

http://www.experts-exchange.com/Other/Math_Science/Q_27242530.html

Thank you.

Do more with

EXPERT OFFICE^{®} is a registered trademark of EXPERTS EXCHANGE^{®}

Let's step away from the general case and ask

"What is happening when the values are very small?"

We have our two equations.

a = (r *tan(b) + h/cos(b) - h)/r - b

x = h*tan(b) + r/cos(b) - r

When "b" is very small, we can use these approximations

tan(b) is approximately equal to "b"

cos(b) is approximately equal to 1

So when b is very small we have

a = 0

x = h*b

So when b is very small and h = 60 (notice r is not a factor)

x = 60*b

We can confirm this with some Java.

```
import java.text.DecimalFormat;
public class SmallValues {
public static void main(String args[]) {
DecimalFormat df = new DecimalFormat("000.000");
double h = 60;
double r = 10;
double a = 0;
double x = 0;
double x2 = 0;
for(double b = 0; b < 0.1; b += 0.005){
a = (r * Math.tan(b) + h/Math.cos(b) - h)/r - b;
x = h*Math.tan(b) + r/Math.cos(b) -r;
System.out.println("b = " + df.format(b) + " a = " + df.format(a) + " x = " + df.format(x));
}
}
}
```

Output results:b = 000.000 a = 000.000 x = 000.000

b = 000.005 a = 000.000 x = 000.300

b = 000.010 a = 000.000 x = 000.601

b = 000.015 a = 000.001 x = 000.901

b = 000.020 a = 000.001 x = 001.202

b = 000.025 a = 000.002 x = 001.503

b = 000.030 a = 000.003 x = 001.805

b = 000.035 a = 000.004 x = 002.107

b = 000.040 a = 000.005 x = 002.409

b = 000.045 a = 000.006 x = 002.712

b = 000.050 a = 000.008 x = 003.015

b = 000.055 a = 000.009 x = 003.318

b = 000.060 a = 000.011 x = 003.622

b = 000.065 a = 000.013 x = 003.927

b = 000.070 a = 000.015 x = 004.231

b = 000.075 a = 000.017 x = 004.537

b = 000.080 a = 000.019 x = 004.842

b = 000.085 a = 000.022 x = 005.149

b = 000.090 a = 000.025 x = 005.455

b = 000.095 a = 000.027 x = 005.763

This would suggest that initially we are unwrapping the rope from the drum rather than unwinding(which would cause turning of the drum).

x + r = r/cos(b) + h*tan(b) .... (eq. 1)

=> C (x+r) - r = hS

=> (x+r)^2 C^2 - 2r(x+r) C + r^2 = h^2(1-C^2)

=> [(x+r)^2 + h^2] - 2r(x+r) C + (r^2 - h^2) = 0

x + r = r/C + h*T

=> T = (x+r)/h - r/hC ..... (eq. 6)

Solving for C,

C = [2r(x+r) + sqrt(4r^2(x+r)^2 - 4[(x+r)^2 + h^2](r^2 - h^2))]/2[(x+r)^2 + h^2]

= [r(x+r) + h sqrt((x+r)^2+h^2-r^2)]/[(x

and

C = [r(x+r) - h sqrt((x+r)^2+h^2-r^2)]/[(x

so

b = ArcCos( [r(x+r) + h sqrt((x+r)^2+h^2-r^2)]/[(x

and

b = ArcCos( [r(x+r) - h sqrt((x+r)^2+h^2-r^2)]/[(x

Substituting eq. 2 to eq.6 into a,

a = (r *tan(b) + h/cos(b) - h)/r - b

= T + h/rC - h/r - b

= (x+r)/h - r/hC + h/rC - h/r - b

= (x+r)/h - h/r - ArcCos( [r(x+r) - h sqrt((x+r)^2+h^2-r^2)]/[(x

a = (r *tan(b) + h/cos(b) - h)/r - b

= T + h/rC - h/r - b

= (x+r)/h - r/hC + h/rC - h/r - b

= (x+r)/h - h/r - ArcCos( [r(x+r) + h sqrt((x+r)^2+h^2-r^2)]/[(x

and

a = (r *tan(b) + h/cos(b) - h)/r - b

= T + h/rC - h/r - b

= (x+r)/h - r/hC + h/rC - h/r - b

= (x+r)/h - h/r - ArcCos( [r(x+r) - h sqrt((x+r)^2+h^2-r^2)]/[(x

... - h sqrt((x+r) ...

should that be

- h * sqrt((x+r)

?

h^2)/(hr [r(x+r) - h sq

should that be

h^2)/(h*r [r(x+r) - h sq

?

```
a = (x+10)/60 - 60/10 - Math.acos( (10*(x+10) - 60 * Math.sqrt(Math.pow(x+10,2) + Math.pow(60,2) - Math.pow(10,2)))/(Math.pow(x+10,2) + Math.pow(60,2))) - (Math.pow(10,2) - Math.pow(60,2))/(60*10 *(10*(x+10) - 60 * Math.sqrt(Math.pow(x+10,2) + Math.pow(60,2) - Math.pow(10,2)))/(Math.pow(x+10,2) + Math.pow(60,2)));
```

I don't know if I made a mistake in the conversion or not.
x + r = r/cos(b) + h*tan(b)

=> x + r = r/C + h*T

=> h * T = (x+r) - r/C

=> T = (x+r)/h - r/(h*C)

x/h = tan(b) + (r/h)/cos(b) - r/h

let j = x/h

k = r/h

C = cos(b)

Use pkwan's method:

sqrt(1 - C^2)/C = tan(b) //trig identity

j+k = sqrt(1 - C^2)/C + (r/h)/C

C(j+k) - k = sqrt(1 - C^2)

(C(j+k) - k)^2 = 1 - C^2

C^2(j+k) + k^2 - 2Ck(j+k) = 1 - C^2

0 = ((j+k)^2 + 1)C^2 - 2k(j+k)C + k^2 - 1

Use quadratic formula:

C = (2k(j+k) + sqrt((2k(j+k))^2 - 4((j+k)^2 + 1)(k^2 - 1)))/2((j+k)^2 + 1)

Rewrite for java:

C = (2*k*(j+k) + Math.sqrt(Math.pow(2*k*(j+

Here is java code.

```
import java.text.DecimalFormat;
public class Ax {
public static void main(String args[]) {
DecimalFormat df = new DecimalFormat("00.000");
double h = 60; //height of drum from base line
double r = 10; //drum radius
double k = r/h;
double j = 0;
double a = 0;
double C = 0; // equals cos(b)
for(double x = 0; x <= 1000; x += 50){
j = x/h;
C = (2*k*(j+k) + Math.sqrt(Math.pow(2*k*(j+k),2) - 4*(Math.pow(j+k,2) + 1)*(k*k - 1)))/(2*(Math.pow(j+k,2) + 1));
a = (r * Math.tan(Math.acos(C)) + h/C - h)/r - Math.acos(C);
System.out.println(" x = " + df.format(x) + " a = " + df.format(a) + " b = " + df.format(Math.acos(C)));
}
}
}
```

The output:x = 00.000 a = 00.000 b = 00.000

x = 50.000 a = 01.759 b = 00.667

x = 100.000 a = 05.498 b = 00.992

x = 150.000 a = 09.905 b = 01.153

x = 200.000 a = 14.571 b = 01.247

x = 250.000 a = 19.358 b = 01.307

x = 300.000 a = 24.212 b = 01.348

x = 350.000 a = 29.105 b = 01.378

x = 400.000 a = 34.023 b = 01.401

x = 450.000 a = 38.959 b = 01.420

x = 500.000 a = 43.908 b = 01.434

x = 550.000 a = 48.865 b = 01.446

x = 600.000 a = 53.830 b = 01.456

x = 650.000 a = 58.800 b = 01.465

x = 700.000 a = 63.774 b = 01.472

x = 750.000 a = 68.751 b = 01.479

x = 800.000 a = 73.731 b = 01.485

x = 850.000 a = 78.714 b = 01.490

x = 900.000 a = 83.698 b = 01.494

x = 950.000 a = 88.684 b = 01.498

x = 1000.000 a = 93.672 b = 01.502

Please check my work. I tried to plug it into

http://www.wolframalpha.com/

but it didn't work. Maybe phoffric knows how to get the plot from that site. We could use java to create graph, if you want to have it.

I will be back online in 6 hours.

2sqrt[(r^2x^2+r^4+2xr^3) - (x^2r^2 + x^2h^2 + r^4-r^2h^2 + 2xr^3-2xrh^2 + h^2r^2-h^4)] <- This line is incorrect (should be x^2r^2

The incorrect derivation is this line:

2sqrt[(r^2x^2-r^2r^2) + (r^4-r^4) + (2xr^3-2xr^3) + (x^2h^2+2xrh^2) + (x^2h^2 - h^2r^2 + h^4)]

=> 2sqrt(x^2h^2 - h^2r^2 + h^4)

You missed this term: (x^2h^2+2xrh^2)

> -848.62 00.00 00.00

That doesn't make any sense. "a" has to be zero at the start.

We have developed two separate methods in our discussion.

In the first method we used these two equations

x = r/cos(b) + h*tan(b) - r

a = (r *tan(b) + h/cos(b) - h)/r - b

by incrementing "b" in each equation to calculate "x" and "a"

In the second method we solved for "b" as a function of "x" ( thanks to the method suggested by pkwan) and plugged it to the second equation. Thus we can now increment "x" and calculate "a" directly.

So you should compare the results of these two methods.

Where did you get that equation ?

In your question at the top above here, you have

a = (r *tan(b) + h/cos(b) - h)/r - b

That is correct.

http://www.experts-exchange.com/Programming/Languages/Scripting/Q_27245193.html

eq. 2 in your graph is correct.

So, I added a graph to an excel spreadsheet (attached) that I did for an earlier question. Rope-Puller.xlsx

rope-pull.PNG

Could you graph the results a(x) from the two separate methods on the same graph ?

In the first method we used these two equations

x = r/cos(b) + h*tan(b) - r

a = (r *tan(b) + h/cos(b) - h)/r - b

by incrementing "b" in each equation to calculate "x" and "a"

In the second method we solved for "b" as a function of "x" ( thanks to the method suggested by pkwan) and plugged it to the second equation. Thus we can now increment "x" and calculate "a" directly.

Good night.

From my post above here:

x = htan(b) + r/cos(b) - r

x/h = tan(b) + (r/h)/cos(b) - r/h

let j = x/h

k = r/h

C = cos(b)

Use pkwan's method:

sqrt(1 - C^2)/C = tan(b) //trig identity

j+k = sqrt(1 - C^2)/C + (r/h)/C

C(j+k) - k = sqrt(1 - C^2)

(C(j+k) - k)^2 = 1 - C^2

C^2(j+k) + k^2 - 2Ck(j+k) = 1 - C^2

0 = ((j+k)^2 + 1)C^2 - 2k(j+k)C + k^2 - 1

Use quadratic formula:

C = (2k(j+k) + sqrt((2k(j+k))^2 - 4((j+k)^2 + 1)(k^2 - 1)))/2((j+k)^2 + 1)

I used j and k to make it more readable and more concise. Where is it not clear ?

The line

0 = ((j+k)^2 + 1)C^2 - 2k(j+k)C + k^2 - 1

is my quadratic equation. Maybe it's clearer if I add brackets

0 = [[((j+k)^2 + 1)]] C^2 - [[2k(j+k)]] C + [[ k^2 - 1]]

The bracketed terms are used in the quadratic formula.

pkwan had a great idea but I don't think he followed through with the implementation.

The data for the two separate methods are both in the attached spreadsheet. When I plotted the both results on one graph, they overlapped.

I don't think that is right. Could you show us how you arrived at that ?

The graph you posted is great. It is easy to see that

b=a at x=20

initial slope of b(x) (see http:#36325705 ) db/dx = 1/60

You can get the open source version for free (using MS on one PC, and open source on other).

http://www.openoffice.org/

brb = be right back

The equations used for x = f(b), where b is incremented is based on results in your question. The equations for b = b(x) are not as I had done them awhile back. But they are equivalent to what you are using based on spot check verification of the data you have been posting.

```
public class Ax {
public static void main(String args[]) {
DecimalFormat df = new DecimalFormat("00.000");
double h = 60; //height of drum from base line
double r = 10; //drum radius
double k = r/h;
double j = 0;
double a = 0; // angle the drum has been rotated
double C = 0; // equals cos(b)
for(double x = 0; x <= 1000; x += 50){
j = x/h;
C = (k*(j+k) + Math.sqrt(j*j + 2*j*k + 1))/((j+k)*(j+k) + 1);
a = (r * Math.tan(Math.acos(C)) + h/C - h)/r - Math.acos(C);
System.out.println(" x = " + df.format(x) + " a = " + df.format(a) + " b = " + df.format(Math.acos(C)));
}
}
}
```

Output:x = 00.000 a = 00.000 b = 00.000

x = 50.000 a = 01.759 b = 00.667

x = 100.000 a = 05.498 b = 00.992

x = 150.000 a = 09.905 b = 01.153

x = 200.000 a = 14.571 b = 01.247

x = 250.000 a = 19.358 b = 01.307

x = 300.000 a = 24.212 b = 01.348

x = 350.000 a = 29.105 b = 01.378

x = 400.000 a = 34.023 b = 01.401

x = 450.000 a = 38.959 b = 01.420

x = 500.000 a = 43.908 b = 01.434

x = 550.000 a = 48.865 b = 01.446

x = 600.000 a = 53.830 b = 01.456

x = 650.000 a = 58.800 b = 01.465

x = 700.000 a = 63.774 b = 01.472

x = 750.000 a = 68.751 b = 01.479

x = 800.000 a = 73.731 b = 01.485

x = 850.000 a = 78.714 b = 01.490

x = 900.000 a = 83.698 b = 01.494

x = 950.000 a = 88.684 b = 01.498

x = 1000.000 a = 93.672 b = 01.502

It would nice to see a graph of a = f(x) ,for x=0 to 1000

I guess if we ask real nice, proffric might post one. I tried to plug it into

http://www.wolframalpha.com/

but its about 8 characters to big(even if I cram it all together.

To make it as easy as possible, here is what is needed.

If we let h=60 r=10 k=.6 j=x/60 , then we have

C = (.16*(x/60+.16)+sqrt((x/60

plug C into

a = (tan(arccos(C))+6/C-6)-arc

I was able to get a image(see below).

>Is a desktop animation or a JApplet possible at this point?

Yes, I'll start working on it, after dinner tonight.

wolframalpha-20110809173740192.gif

## Premium Content

You need an Expert Office subscription to comment.Start Free Trial