Post Reply 
snowplow problem
03-23-2021, 05:50 PM (This post was last modified: 03-27-2021 12:20 AM by Albert Chan.)
Post: #8
RE: snowplow problem
(03-19-2021 04:46 PM)Albert Chan Wrote:  Solve by Newton's method, and we need a rough guess.
(estimate both integrals with single rectangle)

1/(x+1/2) = k /(x+3/2)
x = (3-k)/(2k-2)             -- rough guess for x
z = x/(x+1) = (3-k) / ((3-k)+(2k-2)) = (3-k)/(k+1)

Playing with the formula, I discovered a simpler and better guess for x Smile
Start with original equation:

ln((x+1)/x) = k * ln((x+2)/(x+1))
ln(1 - 1/(1+x)) = -k * ln(1 + 1/(1+x))

Let y = 1/(1+x), 0 < y < 1

ln(k) = ln(-ln(1-y)/ln(1+y)) = y + y^3/4 + 19/144*y^5 + ...

atanh(y) = y + y^3/3 + y^5/5 + ...

→ ln(k) ≈ atanh(y)                // when y is tiny (k ≈ 1)

y ≈ tanh(ln(k)) = (k-1/k) / (k+1/k) = (k²-1) / (k²+1)
x = 1/y - 1 = 2/(k²-1)       // rough guess for x

This is a better guess for x. Bonus: it has the right range, x > 0
(with this new guess x, guess z = x/(x+1) = 2/(k²+1), also very simple)

For k=1.5, new guess x=1.6 (96 minutes), old guess x=1.5 (90 minutes)
True x ≈ 1.568 (94 minutes)

For k=2.0, new guess x=2/3 (40 minutes), old guess x=1/2 (30 minutes)
True x = φ-1 ≈ 0.6180 (37 minutes)

---

Update: if we apply asinh on top of atanh, it fit ln(k) even better.

asinh(atanh(y)) = y + y^3/6 + 13/120*y^5 + ...

→ ln(k) ≈ asinh(atanh(y))

y = tanh(sinh(ln(k))) = tanh((k-1/k)/2) = (e^(k-1/k)-1)/(e^(k-1/k)+1)

x = 1/y - 1 = 2/expm1(k-1/k)

expm1(k-1/k) = 2*(k-1) + (k-1)² + (k-1)³/3 + (k-1)^4/6 - (k-1)^5/15 + ...

Keep 2 terms, x = 2/(2*(k-1)+(k-1)²) = 2/(k²-1), matching old estimate
Keep 3 terms, x = 2/(k^3/3+k-4/3) = 6/((k-1)*(k²+k+4))

This is an improvemnt over old estimate:

For k=1.5, guess x = 6/3.875 = 1.548 (93 minutes)
For k=2.0, guess x = 6/10 (36 minutes)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
snowplow problem - EdS2 - 03-18-2021, 03:24 PM
RE: snowplow problem - Albert Chan - 03-18-2021, 08:38 PM
RE: snowplow problem - Albert Chan - 03-19-2021, 04:46 PM
RE: snowplow problem - Albert Chan - 03-20-2021, 01:10 PM
RE: snowplow problem - Albert Chan - 03-23-2021 05:50 PM
RE: snowplow problem - Albert Chan - 03-27-2021, 04:34 PM
RE: snowplow problem - EdS2 - 03-19-2021, 11:34 AM
RE: snowplow problem - Ren - 03-19-2021, 07:01 PM
RE: snowplow problem - EdS2 - 03-22-2021, 12:18 PM



User(s) browsing this thread: 1 Guest(s)