Timeline for Function for a series of joined slopes
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 25, 2015 at 11:34 | comment | added | Mr.Wizard | @J. M. I hope soon that you are able to implement that yourself. | |
| May 25, 2015 at 11:23 | comment | added | J. M.'s missing motivation | A variation of this one might try is to form a piecewise-constant function from the given derivatives and then use DSolve[] (if using Piecewise[] or UnitStep[]) or NDSolve[] (if using Interpolation[]) to integrate this piecewise constant function. | |
| Jan 11, 2015 at 9:55 | vote | accept | Mr.Wizard | ||
| Jan 10, 2015 at 22:08 | history | edited | DumpsterDoofus | CC BY-SA 3.0 | added 2 characters in body |
| Jan 10, 2015 at 20:39 | comment | added | Michael E2 | To clarify: The output of Integrate is an InterpolatingFunction that has derivative information stored in it; namely, the values of the derivative at the transition points are specified to be the values the input function. Examine the "dataDerivative" and "basicInterpolatingUnit" fields as defined in this answer, which can be extracted with Extract[Head[f2[x]], {{2, 3}, {4}}]. (Note the third element, the input grid, is missing from the answer.) -- Sorry, I felt I was a little vague, so now I'm over-specific. ;) | |
| Jan 10, 2015 at 16:57 | comment | added | Michael E2 | @Mr.Wizard The cool thing about Integrate here is that it incorporates the derivative info from Interpolation[dat,..] into the integral. It doesn't make a difference here, but it does when integrating a continuous interpolating function. And it has only half the speed of the Accumulate[Differences[dat[[All, 1]]] dat[[2 ;;, 2]]] method. I found the FoldList method slow on DumpsterDoofus's bigger example, but it seems to be closer this morning. I was tired last night and failed to post an answer. | |
| Jan 10, 2015 at 7:35 | comment | added | Mr.Wizard | Following my usual practice I shall wait 24 hours from posting the question before Accepting an answer, but I don't imagine this will be beaten. | |
| Jan 10, 2015 at 7:06 | comment | added | Mr.Wizard | See, I had a feeling I was missing something like this. Thanks. :-) | |
| Jan 9, 2015 at 23:01 | history | edited | DumpsterDoofus | CC BY-SA 3.0 | added 84 characters in body |
| Jan 9, 2015 at 22:46 | history | edited | DumpsterDoofus | CC BY-SA 3.0 | added 379 characters in body |
| Jan 9, 2015 at 22:35 | history | answered | DumpsterDoofus | CC BY-SA 3.0 |