Search Results - VBForums

# Search:

Type: Posts; User: jemidiah

Page 1 of 13 1

1. ## Thread: What point on the graph of f(x) is closest to the origin?

by jemidiah
Replies
3
Views
85

### Re: What point on the graph of f(x) is closest to the origin?

I don't think so. I did look at the graph, and +/- sqrt(2) seems very reasonable to me. It's hard to eyeball, unfortunately. Make sure you're looking at it on a graph where the x and y axes have the...
2. ## Thread: What point on the graph of f(x) is closest to the origin?

by jemidiah
Replies
3
Views
85

### Re: What point on the graph of f(x) is closest to the origin?

Points on the graph are (x, 5/2 - x^2), which has a squared distance from the origin of x^2 + (5/2 - x^2)^2 = x^4 - 4x^2 + 25/4. To minimize, the derivative is 4x^3 - 8x = 4x(x^2 - 2), which has...
3. ## Thread: how to convert binary numbers into decimals or numbers to decimals [HELP]

by jemidiah
Replies
1
Views
113

### Re: how to convert binary numbers into decimals or numbers to decimals [HELP]

You'll have to be more specific. Give some examples of problems you want to solve but don't know how.
4. ## Thread: Reducing numbers to one digit (numerology related)

by jemidiah
Replies
12
Views
266

### Re: Reducing numbers to one digit (numerology related)

For what it's worth, this thread seems to have no actual math questions--it's all about coding basic operations on digits and letters. A more appropriate place for this type of post is probably the...
5. ## Thread: [RESOLVED] Prime Numbers

by jemidiah
Replies
10
Views
417

### Re: Prime Numbers

For what it's worth, the number of distinct results mod n of numbers relatively prime to n is called Euler's totient function phi(n) (Google if interested). It turns out to be really easy to compute...
6. ## Thread: Poker stats.

by jemidiah
Replies
8
Views
405

### Re: Poker stats.

How silly, thanks!
7. ## Thread: Poker stats.

by jemidiah
Replies
8
Views
405

### Re: Poker stats.

Just to comment on the five of a kind vs. straight flush question, given X decks, the number of five-card hands which are five-of-a-kind is just (4X choose 5), since there are 4X fives to choose...
8. ## Thread: Poker stats.

by jemidiah
Replies
8
Views
405

### Re: Poker stats.

I could compute/tell you how to compute the probability that a randomly selected 5-card hand using X standard decks is a five of a kind/full house/etc. I don't know how relevant those computations...
9. ## Thread: Rotate triangle by orthocenter

by jemidiah
Replies
5
Views
533

### Re: Rotate triangle by orthocenter

@passel: Nope, that's the barycenter, not the orthocenter. In barycentric coordinates like I discussed in my post, the point you describe has position (1, 1, 1).
10. ## Thread: Rotate triangle by orthocenter

by jemidiah
Replies
5
Views
533

### Re: Rotate triangle by orthocenter

I know nothing about XNA, but there is almost certainly a "rotate" method that'll handle the 2D rotation for you. The formulas are not at all hard, but still, no reason to duplicate work. If not I'd...
11. ## Thread: An easy famous unsolved problem :

by jemidiah
Replies
13
Views
652

### Re: An easy famous unsolved problem :

I'm guessing Atenk confused the Collatz conjecture with a Millennium Prize problem. Those indeed have million-dollar rewards, whereas as far as I'm aware Collatz has just Erdos' \$500 (and someone...
12. ## Thread: An easy famous unsolved problem :

by jemidiah
Replies
13
Views
652

### Re: An easy famous unsolved problem :

Yup, there's a ton of basic work that's already been done on Collatz (which is why I mentioned one of its names). An interesting note is that if you allow negative numbers you get a few more loops,...
13. ## Thread: An easy famous unsolved problem :

by jemidiah
Replies
13
Views
652

### Re: An easy famous unsolved problem :

I fiddled with the Collatz conjecture for a few days once and got pretty much nowhere, which seems to be everyone's situation :). Well, I vaguely remember finding a few results or equivalences I've...
14. ## Thread: Stock Control

by jemidiah
Replies
1
Views
219

### Re: Stock Control

You could always use a more complex structure to store the info. For instance, you could store a polygon representing the sheet of glass in its current state, where a 2400x1200 sheet would just be...
15. ## Thread: Plotting points and accounting for resize

by jemidiah
Replies
5
Views
627

### Re: Plotting points and accounting for resize

Is there a reason you're using "angles(i) = CInt(i * Math.PI / 3)" instead of "angles(i) = i * Math.PI / 3" (with angles() a floating point array)? Decimals really matter for radian angles and...
16. ## Thread: Plotting points and accounting for resize

by jemidiah
Replies
5
Views
627

### Re: Plotting points and accounting for resize

It's hard to say what's wrong when you haven't posted much of your actual code, especially since the problem seems to be the edge labels but you've shown no edge label code. Still, it's probably...
17. ## Thread: This interest rate, how ?

by jemidiah
Replies
21
Views
1,389

### Re: This interest rate, how ?

I agree entirely Niya :). I just thought for someone needing help translating from Python to .NET, functions as arguments might be a concept they hadn't seen before, so I pointed it out.
18. ## Thread: This interest rate, how ?

by jemidiah
Replies
21
Views
1,389

### Re: This interest rate, how ?

It's not a math question at this point, so I won't take the time to do the translation, sorry. There are a zillion Python tutorials out there; it really shouldn't be hard to do it yourself. The only...
19. ## Thread: This interest rate, how ?

by jemidiah
Replies
21
Views
1,389

### Re: This interest rate, how ?

Here's a minimal working example in VB.NET.

Public Class Form1
Dim A As Double = 1000
Dim P As Double = 30
Dim N As Double = 56

Private Function f(ByVal I As Double) As...
20. ## Thread: This interest rate, how ?

by jemidiah
Replies
21
Views
1,389

### Re: This interest rate, how ?

I am, just intermittently.

Atenk is right, inasmuch as the problem can't in general be solved algebraically (and standard special functions don't seem to be enough). Nonetheless, the function is...
21. ## Thread: VB School Project Help!

by jemidiah
Replies
9
Views
1,001

### Re: VB School Project Help!

(For what it's worth, while this is arguably a math question, it seems like by far the main difficulty is/was programming, so the main VB.NET forum might have been more appropriate. I'm just...
22. ## Thread: Cubic Spline Tutorial

by jemidiah
Replies
27
Views
19,186

### Re: Cubic Spline Tutorial

He noted that if you rewrite the form of the spline a bit, you can determine the other parameters easily from just the second derivatives. The relevant equations are in red (a1 through d1 equaling...
23. ## Thread: Parametric Cubic Spline Tutorial

by jemidiah
Replies
13
Views
15,340

### Re: Parametric Cubic Spline Tutorial

You should probably start your own new thread. You'll also have to be more specific: what exactly do you not understand in the paper? I'm not going to untangle it hoping to find the piece of...
24. ## Thread: Solving Index Laws (Algebra) using .Net

by jemidiah
Replies
7
Views
1,085

### Re: Solving Index Laws (Algebra) using .Net

Not that I'm aware of; or at least, the user would need Mathematica installed, which is expensive (though most universities,at least in the US, seem to have licenses to give out for it).
25. ## Thread: Solving Index Laws (Algebra) using .Net

by jemidiah
Replies
7
Views
1,085

### Re: Solving Index Laws (Algebra) using .Net

Oh, ok. Strictly speaking the Wolfram Alpha solution would work, but it's wild overkill. The real issue is parsing the input, the math is trivial. You could always make it easy on yourself and just...
26. ## Thread: Solving Index Laws (Algebra) using .Net

by jemidiah
Replies
7
Views
1,085

### Re: Solving Index Laws (Algebra) using .Net

I'm still not clear on the manipulations required.... Multiplying binomials is pretty trivial. Dividing them doesn't make a long of sense most of the time, though polynomial division is easy to...
27. ## Thread: Solving Index Laws (Algebra) using .Net

by jemidiah
Replies
7
Views
1,085

### Re: Solving Index Laws (Algebra) using .Net

Is the question to find all solutions to some polynomials? Or to symbolically factor polynomials? Or find roots of not-necessarily-polynomials?

In any case, the Wolfram Alpha API should be able to...
28. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### Re: [RESOLVED] catenary problem

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

29. ## Thread: [RESOLVED] What is the answer to this ?

by jemidiah
Replies
6
Views
1,779

### 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...
30. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### 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...
31. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### 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....
32. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### 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...
33. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### 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...
34. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### 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...
35. ## Thread: [RESOLVED] catenary problem

by jemidiah
Replies
26
Views
6,384

### 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....
36. ## Thread: my linear algebra questions

by jemidiah
Replies
1
Views
621

### 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...
37. ## Thread: intersection point slightly off

by jemidiah
Replies
2
Views
1,113

### 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...
38. ## Thread: Exponential Moving Average

by jemidiah
Replies
2
Views
1,470

### 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?
39. ## Thread: [RESOLVED] How to Find R in formula??

by jemidiah
Replies
3
Views
1,764

### 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"...
40. ## Thread: Puzzle

by jemidiah
Replies
4
Views
1,504

### 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...
Results 1 to 40 of 500
Page 1 of 13 1