That sounds like a fine solution. You can even confuse people and change the direction of gravity :)
Glad to have been helpful.
Type: Posts; User: jemidiah
That sounds like a fine solution. You can even confuse people and change the direction of gravity :)
Glad to have been helpful.
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...
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...
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....
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...
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...
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...
@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....
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...
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...
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?
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"...
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...
Excellent, though there's a minor error in the final case; try p=q=3.
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...
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.
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...
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%,...
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...
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.
...
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...
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...
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.
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...
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...
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...
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...
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...
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...
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 (==...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...