Search:

Type: Posts; User: jemidiah

Page 1 of 13 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    That sounds like a fine solution. You can even confuse people and change the direction of gravity :)

    Glad to have been helpful.
  2. Replies
    5
    Views
    226

    Re: What is the answer to this ?

    FWIW, as a PhD student in math, I agree entirely. Realistically you'll confuse people with the sort of expression above so you should just use extra brackets, but the common convention does cover...
  3. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    Your proposed solution sounds great. It reuses your existing work and only adds a small amount of complexity to the logic. There might be a more efficient way, but I won't take the time to look for...
  4. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    The value my routine gives with s=10, h=5, d=3 is a = -0.5396923312383373. Here sqrt(s^2 - h^2) = 8.660254037844387 while with my a, 2*a*math.sinh(d/(2*a)) = 8.660254751809196, which is very close....
  5. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    For the trig function issue, you can always define new functions like "cosr(x) = cos(radToDeg(x))". That could help take off some of the "cognitive load" (roughly, the things you have to keep track...
  6. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    Here's a Python translation of my previous code. It gives correct output for a(10, 5, 3). Just to be clear, I modified more than just the fx line. Does your version calculate a correctly while still...
  7. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    Your Newton-Raphson code seems to have a lot of errors. Most of your code is actually (though incorrectly) computing a root for 2a sinh(d/(2a)), but "if abs(fx) - result <= epsilon" is masking the...
  8. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    @loocas_duber: It's probably best for you to get very basic functionality working first, and then add on other stuff. In particular, you should get something that can just plot y = cosh(x) in 3D....
  9. Replies
    1
    Views
    243

    Re: my linear algebra questions

    1.a. We must show the only linear combination of elements of A giving the 0 polynomial is the trivial combination. So, let c_0 p_0 + ... + c_n p_n = 0 for real numbers c_i. Plug in x=a_i. For each...
  10. Replies
    2
    Views
    781

    Re: intersection point slightly off

    It looks like rounding error is throwing the result off. At some point there's nothing that can be done, but at least the y-coordinate can be made a bit more accurate by not rounding x to an integer...
  11. Replies
    2
    Views
    713

    Re: Exponential Moving Average

    The Wikipedia entry on the subject is a bit of a mess, though it does give a simple [tail] recursive formula for computing the EMA. What exactly is your difficulty?
  12. Replies
    3
    Views
    1,197

    Re: [RESOLVED] How to Find R in formula??

    Cool, glad it worked out.

    While I suppose it doesn't matter, for the unit conversion you had said, "Plz Note "R" = R/1200", which I do not find at all "clear". Given your most recent post, by "R"...
  13. Thread: Puzzle

    by jemidiah
    Replies
    4
    Views
    1,060

    Re: Puzzle

    Cool, looks good :)

    Your proof can perhaps be made more "elegant" with some rearrangement of the presentation, maybe like the following:


    Let A = (p-1)^q mod p and B = q^(p-1) mod p.
    The sum...
  14. Thread: Puzzle

    by jemidiah
    Replies
    4
    Views
    1,060

    Re: Puzzle

    Excellent, though there's a minor error in the final case; try p=q=3.
  15. Replies
    3
    Views
    1,197

    Re: How to Find R in formula??

    There is no "nice" formula for R in terms of the remaining variables, however you can numerically compute R pretty easily using a method called "quadrature", where I'm assuming a solution exists...
  16. Thread: Puzzle

    by jemidiah
    Replies
    4
    Views
    1,060

    Puzzle

    1. Show that 30^239 + 239^30 is not prime.

    2. Investigate when (p-1)^q + q^(p-1) is divisible by p, for primes p and q.

    Fermat's Little Theorem may be helpful.
  17. Re: Magic square, 5x5, even numbers from 2 to 50 totalling 130

    You can of course just halve all the entries to get a more traditional puzzle. Here's a solution to that version. Here's a Wikipedia page discussing the general method; perhaps your son was supposed...
  18. Replies
    1
    Views
    627

    Re: Battery charge cycle math

    Each time the user plugs in their iPhone, they used (100-x)% = 1-(x/100) of a charge cycle. Doing this N times charges the battery N*(1-(x/100)) cycles. When the capacity has been diminished to 80%,...
  19. Replies
    1
    Views
    993

    Re: Combinations with different probability

    Not that I know of, at least when the probabilities are not all equal. Higher order iteration libraries like Python's Itertools allow you to iterate over combinations like you've described, and you...
  20. Thread: x ^ y Mod z

    by jemidiah
    Replies
    3
    Views
    635

    Re: x ^ y Mod z

    If y=-1, you use the extended Euclidean algorithm to compute the result. You can then reduce the y negative case to the y positive case by inverting, computing as above, and inverting again.
    ...
  21. Thread: x ^ y Mod z

    by jemidiah
    Replies
    3
    Views
    635

    Re: x ^ y Mod z

    Yup, the usual algorithm is exponentiation by squaring with modular reduction after each step, and I imagine better ones exist. It's a native command in Python if I remember correctly, so it's a...
  22. Re: Calculate Inclination from Pitch and Roll

    Unfortunately I cannot understand you. Specifically...
    (1) What does "inclination from vertical at x-direction" mean?
    (2) What does "inclination from vertical at y-direction" mean?
    (3) What does...
  23. Re: [RESOLVED] calculate largest rectangle that fits in ellipse

    Sure, though as my derivation shows, using height * sqrt(2) and width * sqrt(2) is exact. Yours is a decent approximation since

    sqrt(2) = 1.4142...
    4/3 = 1.3333...

    are reasonably close.
  24. Re: calculate largest rectangle that fits in ellipse

    The ellipse in your case is given by the equation

    x^2 / A^2 + y^2 / B^2 = 1

    where 2A is the width and 2B is the height of the ellipse. You wish to find a point (p, q) on the ellipse such that...
  25. Re: calculating vertices of a square

    Given A and C, the center of the square is M = (A+C)/2. Suppose P is a vector perpendicular to the vector from A to C of the same length. Then B is M + P/2 and D is M - P/2. In 2D, it happens that...
  26. Replies
    8
    Views
    2,058

    Re: 2D translate + scale + rotate

    I think I've misunderstood your situation. I don't know enough about these WPF systems to want to debug your current solution. Alternatively, you could describe precisely what situation you have and...
  27. Replies
    8
    Views
    2,058

    Re: 2D translate + scale + rotate

    Here's my translation of my previous post into code. I have not debugged it, though I have tried to be careful.


    Private Sub ZoomToPoint(zoomRatio As Double, zoomFocus As Point, rotation As...
  28. Replies
    8
    Views
    2,058

    Re: 2D translate + scale + rotate

    Your rotation code is indeed confused. Forgive me if this reply is terse, I'm a bit busy.

    Let Z denote zoomFocus, ZS denote zoomFocus after scaling, and ZSR denote it after scaling followed by...
  29. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    Cool, go for it. I don't care about acknowledgment in this particular case since the derivation is (relatively speaking) simple--no insight (the hard part of doing math) required, just some fiddling...
  30. Replies
    26
    Views
    3,871

    Re: [RESOLVED] catenary problem

    The assumptions are indeed slightly different, thanks to Windows' annoying inverted y-axis. If in Catenary_X1, pLeft.Y is 50 and pRight.Y is 100, pLeft is in fact above pRight by 50, so that v (==...
  31. Replies
    4
    Views
    937

    Re: need some help to solve math problem

    I'm sorry jessica, but I don't really believe your problem description--it makes the problem completely intractible. You didn't put any constraints on the formulas, and in that case considering only...
  32. Replies
    4
    Views
    663

    Re: [RESOLVED] draw this?

    I'm glad it worked out. I confess I haven't fully worked through the logic behind your code. I was somewhat shocked it worked when I tried it; I can see the logic in general, but it gets closer than...
  33. Replies
    4
    Views
    663

    Re: draw this?

    The lines are given by endpoints of the form (0, nw), ((m-n)w, 0) for constant m and w, and for n ranging from 1 to to m-1. In the drawn case, m=16, one more than the number of lines drawn, and I'd...
  34. Re: Linear Transformations on vector spaces Help

    M2(R) is the vector space of 2x2 matrices with real entries where addition and scaling are done componentwise. There are several similar notations for similar notions. As I mentioned ker T (read "the...
  35. Re: Linear Transformations on vector spaces Help

    a. A vector space is in particular a set, where vector addition and scaling "make sense". A subspace of a vector space is a subset, where vector addition and scaling continue to "make sense". Subsets...
  36. Replies
    26
    Views
    3,871

    Re: catenary problem

    I double-checked it myself and found I had forgotten the 1/2's in the exponential version of the hyperbolic trig functions. They canceled later though. I ran it through two edge cases and the...
  37. Replies
    26
    Views
    3,871

    Re: catenary problem

    You want to solve for x_1, which will tell you how much things were translated horizontally; after that it's easy to figure out how much things were translated vertically. One way to solve for x_1 is...
  38. Replies
    28
    Views
    2,925

    Re: Interesting math problems

    I got to thinking I may have made it a little too hard because of the use of a pair of identities that may be stumbling blocks. So, my solution is below.

    Solution: Plotting the successive...
  39. Replies
    4
    Views
    2,038

    Re: PrintDocument crash

    Interesting. Thanks for taking the time to voice your experience. In my own case (as I recall) the users in question upgraded their machines. I feel a little bad about that, but to be fair they were...
  40. Replies
    6
    Views
    1,100

    Re: Counting formulas

    This Python script computes S_n for n from 1 to 4 correctly using my algorithm. It was somewhat fun to fiddle with higher order iteration, but the extremely naive method I've used becomes too...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4