Wikipedia:Reference desk/Archives/Mathematics/2011 December 8

= December 8 =

Integration
How do i integrate (ax/(b-cx))^0.5?--95.82.51.215 (talk) 09:40, 8 December 2011 (UTC)
 * http://www.wolframalpha.com/input/?i=integral%28ax%2F%28b-cx%29%29^0.5dx Bo Jacoby (talk) 10:55, 8 December 2011 (UTC).
 * Use the substitution $$x=b u^2/(a+c u^2)$$, then integrate by parts. Sławomir Biały  (talk) 14:44, 8 December 2011 (UTC)

or put x = (b/c) *squar(Sinx) — Preceding unsigned comment added by 119.152.89.45 (talk) 16:16, 10 December 2011 (UTC)

Time-weighted graph of sparse noisy data
I am hunting for algorithms to compare/contrast for graphing sparse/noisy data. For example, I have the data points: (0,131), (10,127), (55, 135), (123,156), (179,142), (204,131). I want to graph from 0 to 250. The goal is that the graph will be close to the real data, weighting estimated Y values to be more influenced by Y values with a nearer X value than Y values with a further X value. For example, at 100 I want to use (123,156) more than I would use (204,131) because 100 is closer to 123 than it is to 204. Unfortunately, any Googling that includes "time weighted" turns up stock pricing algorithms which are useless for this. -- k a i n a w &trade; 18:45, 8 December 2011 (UTC)
 * Some sort of local regression, perhaps? Qwfp (talk) 19:26, 8 December 2011 (UTC)


 * Thanks. I understand "regression" to mean "turning a set of data points into a formula." What I'm looking at doing is, given a set of X,Y values, pick a X for which I don't have a Y and use some sort of algorithm to estimate Y. There are several possibilities that I've already covered in this survey:
 * Whatever the previous value of Y is will be the value of Y until there is a new value of Y.
 * Draw a straight line between the previous and next Y. Where it crosses X with the unknown Y is what Y will be.
 * Between two Y values Y1 and Y2, let the unknown Y be (Y1+Y2)/2. (mean average)
 * For a given X, set Y to be the value of Y in which the mean of the distances to all known Y's is minimized. (repeat for least squared means also).
 * Those are some examples. I'm doing a survey on why/where each version of this is used. The big difference between this and regression is that I'm not calculating a f(x) for the data points. I'm just calculating unknown Y's for whatever X that I decide I want to use. -- k a i n a w &trade; 01:05, 9 December 2011 (UTC)
 * Whether we fit a specific analytic function to the data using all the points (i.e. curve fitting), or use one of your example localized algorithms, these are all broadly interpolation schemes. Another class of more local techniques is splines. Are you trying to survey what algorithms are being used today in the relevant fields, or are you just interested in what's out there? If the latter, maybe a textook like this would be a good place to start. (sadly we have no list of interpolation schemes, only List of interpolated songs) SemanticMantis (talk) 02:14, 9 December 2011 (UTC)


 * Thanks. Interpolation is the keyword that I needed to find information for this survey. -- k a i n a w &trade; 03:12, 9 December 2011 (UTC)


 * Interpolation is the first iteration in a numerical optimization loop. The general problem you're describing is an estimation and model fitting problem subject to constraints.  How sophisticated do you really want to get?  For example, you can use weighted interpolation, or you can use a piecewise spline fit, or you can use a relaxation algorithm subject to smoothing constraints, and so on ad infinitum until the complexity of your curve-fitting technique dwarfs any other aspect of your project.
 * Here's what is important: (1) how much do you trust your data? Qualitatively, this corresponds to a "weighting function."  (2) How much do you already know what your final answer should look like?  This corresponds to numerical preconditioning.  (3) To what extent are you willing to accept or reject outliers?  This corresponds to the measure you should apply when calculating your objective function.  (4) How long can you wait for an answer?  This directly corresponds to the number of iterations - in other words, how many times you take the previous best-fit (say, the interpolation from the last trial), and "re-interpolate" it to make it fit even better.  In the most general case, you aren't merely interpolating - you can be performing an arbitrary numerical modeling operation to your data in each pass, obtaining a better curve-fit each time.
 * If you just have a 1-dimensional set of points (i.e., you know y(x) for some random set of x in the range of interest), and you just want to fit a curve to it, then the least-squares method will allow you to calculate optimal fit. If the number of free parameters that describe your curve is less than the number of sample-points, you have an underdetermined problem, and you don't need to find a best-fit curve - you can just solve analytically.  Nimur (talk) 03:34, 9 December 2011 (UTC)
 * No, that's not what regression means. There's a wide range of nonparametric regression techniques. You want to read Kernel smoother, which I think is more relevant to your needs than some of the other suggestions. -- Meni Rosenfeld (talk) 09:28, 9 December 2011 (UTC)


 * Thanks. That is very much what I'm interested in. A quick search through the medical journals and I've found a lot of hits on "kernel smoother". Being a computer guy, I never would have thought to use the work "kernel" in such a way. -- k a i n a w &trade; 13:39, 9 December 2011 (UTC)

The Derivative of a Function
Is there a name for the class of functions which are the derivative of some everywhere-differentiable function? This is not the class of continuous functions, in light of $$f(x) = x^2 \sin(1/x)$$.

Thanks, --198.213.197.177 (talk) 18:48, 8 December 2011 (UTC)
 * IIRC such a function must be of Baire class 1, but the converse does not hold (for example, a Baire-class-1 function can have jump discontinuities, which a derivative cannot). I don't know of any name for that exact class of functions. --Trovatore (talk) 21:08, 8 December 2011 (UTC)


 * This would almost be the class of Henstock-Kurzweil Integrable functions. If F is differentiable at all but countably many points, then it's derivative is HK Integrable. On the other hand, if f is HK integrable, then f is equal almost everywhere to the derivative of it's HK-integral. *This is from memory, but should be correct. Phoenixia1177 (talk) 10:45, 9 December 2011 (UTC)


 * An interesting subclass is the family of all derivatives that vanish on a dense set, and they are named Pompeiu derivatives. Just to show how a weird function the derivate of a function can be... --pm a 14:20, 9 December 2011 (UTC)

Loan rates and overpayments
Driving home today I was thinking. If you have, say, a loan of £100,000 with a fixed interest rate of 5.6% over 20 years my repayment will be £703 per month. If you do the same loan over 25 years the monthly payment is less and will be £627 (simplifying things here possibly). Here in the Uk most mortgage will take overpayments instantly off the capital you owe, whereas normal payments will have the bit of interest charged before they're removed...Now to my hypothetical question. If you chose the 25 year loan and made payments of the difference between that and the 20 year load (e.g. £73 overpayment each month) would you end up paying the loan back quicker than if you'd gone with the 20 year loan? ny156uk (talk) 22:21, 8 December 2011 (UTC)


 * I would think it would work out the same, unless the interest rate or other changes were different. StuRat (talk) 06:57, 9 December 2011 (UTC)


 * ... but it does depend on the exact rules about when the payment is deducted from the balance for interest purposes. Some lenders do use rules that seem unfair to the borrower, such as interest charged on the balance at the start of the year or month rather than on the average or on a daily basis.    D b f i r s   09:25, 9 December 2011 (UTC)


 * However you pay off the loan, the present value of the payments (discounted to when the loan was issued using the interest rate) must equal the amount of the loan (assuming the lender isn't using any tricks of the type Dbfirs describes). That means that the same sequence of payments will pay off the same amount of loan, regardless of what those payments are called and how you nominally divide them between interest and capital. There often are early repayment penalties, though, which could make a big difference. --Tango (talk) 04:34, 10 December 2011 (UTC)