Tag Info

New answers tagged

3

There are two aspects in this problem depending on the exact definition of the task, and, as we shall see, both are completely solved by MMA without any additional facility. The aspects are a) calculate the interpolation of the definite integral $f=\int_0^t \sqrt{1+x^3} \, dx$ b) calculate the interpolation of the antiderivative $fad=\int\sqrt{1+x^3} \, ...


6

Here is the example from the documentation adapted for the OP's data: data = MapIndexed[ Flatten[{#2, #1}] &, {2, 5, 9, 15, 22, 33, 50, 70, 100, 145, 200, 280, 375, 495, 635, 800, 1000, 1300, 1600, 2000, 2450, 3050, 3750, 4600, 5650, 6950}]; f = Interpolation@data (* InterpolatingFunction[{{1, 26}}, <>] *) pwf = Piecewise[ ...


7

There is no documented built-in way to convert the InterpolatingFunction object into explicit Piecewise form (thanks to @MichaelE2 for the link!). So the only possibility to get an explicit interpolating function is to re-implement the built-int Interpolation in the high-level Mathematica language. I have already done this for the built-in "Spline" method ...


9

Use NDSolve antiD = NDSolveValue[{f'[x] == Sqrt[1 + x^3], f[0] == 0}, f, {x, 0, 10}] Example usage: Plot[antiD[x], {x, 0, 10}] Alternatively... This works because this function can be antidifferentiated (by Mathematica). antiD = FunctionInterpolation[ Evaluate @ Integrate[Sqrt[1 + x^3], {x, 0, t}, Assumptions -> 0 < t < 10], {t, 0, ...


2

I am not sure what you are trying to do exactly, but this works fine: ContourPlot[w[x, y, z] /. z -> int[x, y], {x, 0, 8}, {y, 0, 8}]


1

Working backward: You never gave w1 any arguments within ContourPlot (to fill its parameters). The output of z1[x, y] is not a replacement rule. The output of int[x, y] is not a replacement rule. If you give the exact series of replacement that you wish to implement I can help you accomplish it.


1

One can integrate Derivative[0, 1][y][x, t]^2 along with the pde: pde = D[y[x, t], t, t] == D[y[x, t], x, x]; solnDerivative = NDSolve[{pde, y[x, 0] == Exp[-(x)^2], Derivative[0, 1][y][x, 0] == 0, Derivative[1, 0][y][-50, t] == Derivative[0, 1][y][-50, t], Derivative[1, 0][y][50, t] == -Derivative[0, 1][y][50, t], (**) Derivative[0, ...


0

I'm sure this isn't the most beatuiful thing, but it is what I'd do: integratedFunction[xx_?NumericQ] := NIntegrate[(ifunDerivative /. {x -> xx, t -> tt})^2, {tt, 0, 130}]


6

There is a difficulty with the statement of the problem. Generally the problem can be solved as shown below. In this case there is a stipulation that $1 < x < 5$ and $1 < y < 5$. Unfortunately the solution to the system does not satisfy these constraints (also shown below). If we agree to use only numerical techniques and pretend that Solve ...


-2

fulldomain doesn't deliver a list of replacement rules. therefore no replacement done in special Edit If we solve it general (not numerical), i.e. eqn1 = 3/(x y z) - 2 x - 3 y - 5 z == 3 eqn2 = x + y + z == 0 eqn12 = Eliminate[{eqn1, eqn2}, z] sol = y /. Solve[eqn12, {y}] Plot[sol, {x, 1, 5}] (* select real points *) solPoints = {x, y} /. Solve[eqn12, ...


2

Some sample data: r = # - #[[1]] &@(Range[##, 3690] & @@ (AbsoluteTime[{#, {"Day", "Month", "YearShort"}}] & /@ {"05/01/14", "05/03/14"})); hours = N[r/3600]; data = Transpose[{hours, hours^2}]; Integrate: f = Interpolation@data; Integrate[f@x, {x, 0, Last@hours}] ...


9

There's a couple ways to do this: data = {{{2014, 8, 4, 10, 36, 0.}, 257.}, {{2014, 8, 4, 16, 28, 0.}, 385.}, {{2014, 8, 4, 22, 53, 0.}, 176.}, {{2014, 8, 5, 6, 52, 0.}, 148.}, {{2014, 8, 5, 11, 19, 0.}, 192.}}; 1) Convert dates to absolute times: data[[All, 1]] = AbsoluteTime /@ data[[All, 1]]; f1 = Interpolation@data; ...


3

You can fit your data to a plane surface and use ComponentMeasurements to detect the bumps on the surface. data3Ds = Round[data3D, 0.02] // DeleteDuplicates; plane = LinearModelFit[data3D, {x, y}, {x, y}] data3Dp = ParallelMap[{#[[1]], #[[2]], #[[3]] - plane[#[[1]], #[[2]]]} &, data3Ds]; projection = Rasterize[ ...


1

This will not work on version 9... Because there are too much points (about 300295) my laptop can not handle the whole data. The main idea is to use Delaunay triangulation DelaunayMesh in Mathematica. dat = data3D[[1 ;; 3000, All]]; mesh = DelaunayMesh[dat]; HighlightMesh[mesh, {Style[0, Directive[PointSize[Medium], Black]], Style[2, Opacity[0.1]]}] ...


1

An example interpolation of 4D data: Interpolation[Join[#, {RandomReal[]}] & /@ Tuples[Range@10, 3]] For Interpolation to treat the indexing as regular the indices must be in ascending order, with the right-hand side iterating first (e.g. {1,1,1}, {1,1,2}, {1,1,3}). Note that Tuples is automatically in the right order if the provided array is in the ...



Top 50 recent answers are included