Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions from all groups sorted by activeHas the behavior of $RecursionLimit changed, or is this a bug?
http://community.wolfram.com/groups/-/m/t/1523515
The tutorial [Controlling Infinite Evaluation][1] says:
> When the Wolfram Language stops without finishing evaluation, it returns a held result. You can continue the evaluation by explicitly calling `ReleaseHold`.
It includes this minimal example:
> `In[1]:= x = x + 1`
>
> ... $RecursionLimit: Recursion depth of 256 exceeded.
>
> `Out[2]= 255 + Hold[1 + x]`
It appears this is no longer the behavior in version 11.3. Instead of evaluating to a partial result when `$RecursionLimit` is reached, the *original* expression wrapped in `Hold` is returned. Actually, to be more precise, when I evaluate `x=x+1` on a fresh kernel I get `Hold[x+1]`, but if I set `$RecursionLimit` to any valid number I get `Hold[x=x+1]`.
In contrast, the behavior of `$IterationLimit` is as documented.
The Mathematica StackExchange discussion for reference: https://mathematica.stackexchange.com/questions/184259/unwanted-hold-from-recursive-function/
[1]: https://reference.wolfram.com/language/tutorial/ControllingInfiniteEvaluation.htmlRobert Jacobson2018-10-20T04:43:11ZHelp making Conditional Statement work in a Loop
http://community.wolfram.com/groups/-/m/t/1524218
I am a beginner in running small simulations in Mathematica and I am trying to code a loop to compute the expected value of a piecewise function. To do so, I am trying first to make a conditional statement work inside a loop, without success.
I cannot make the conditional statement work inside the loop, which seems silly. In the code, the variable j can be either higher or lower than 3, but the output of the conditional statement in the code does not vary for different values of j. Can someone pinpoint the error? Thanks!
n=10;
For[z = 0; j = 1, j < n + 1, j++,
Print[j];
z = RandomVariate[NormalDistribution[0, 1], n];
if[j < 3, x = j, x = 0]; Print[x];
]Maria Bustamante2018-10-20T14:44:29ZLibraryLink function name from inside the library
http://community.wolfram.com/groups/-/m/t/1523963
When developing with LibraryLink, is there any way to get the function name from inside the library ?
I don't think there is a way to find out the name of the function that have been used to access the C function like the `FunctionX` shown in the example bellow.
FunctionX = LibraryFunctionLoad[...]
I suspect there might be something in `WolframRuntimeData` but this one is not documented anywhere.Neel Basu2018-10-20T17:04:14ZEstimation of discrete variable
http://community.wolfram.com/groups/-/m/t/1524074
Dear all,
I have three set of discrete data as following:
Dependent Variables: Y={30,42,53, ? }
Independent Variables : X={12,14,19,22},
Z={15,18,27,33}
How can I estimate/predict ? value in dependent variables list?
Thanks for your help.M.A. Ghorbani2018-10-20T16:52:39ZMathematica Takes my Data as Boolean When it is Numeric Discrete Count Data
http://community.wolfram.com/groups/-/m/t/1523074
I am attempting to use "Classify" to classify based on two classes. I can use data that are clearly numeric like 1.234 with no problem. However, one of my datasets is discrete count data and that is causing a problem. Most of the data points are either 0 or 1 with a few higher numbers scattered throughout (See example below). Mathematica automatically selects "mixed input from the training set but when I enter the test data, Mathematica assumes it is boolean. When it gets to the first number >1, it throws an error (See below). I need to force it to recognize all of the data points in the training data as numeric and all of the points in the test data as numeric. The test and training data files are attached below. How can this be done?
Example Data:
TrainingData={{0,1,0,0,0,2,0,1,0,0,0,0,0,0,3,0,0,0,1,0}->
"A",{0,1,0,0,0,2,0,1,0,0,0,0,0,0,3,0,0,0,1,0}->"B"}
'My datasets are actually much larger than this with 8000 features but this is just an example
nn=Classify[TrainingData]
'This works fine but sets input to "Mixed"
TestData={{0,1,0,0,0,2,0,1,0,0,0,0,0,0,3,0,0,0,1,0},
{0,1,0,0,0,2,0,1,0,0,0,0,0,0,3,0,0,0,1,0}}
nn[TestData]
'This throws the error
ClassifierFunction::mlincfttp: Incompatible variable type (Boolean) and variable value (2).Jamie Dixson2018-10-19T23:55:02ZSolve System of 2nd Order Partial Differential Equations (PDEs)?
http://community.wolfram.com/groups/-/m/t/1520388
Consider the following code:
eq1 = D[C1[x, t], t] == D1 D[C1[x, t], {x, 2}];
eq2 = D[C2[x, t], t] == D2 D[C2[x, t], {x, 2}];
eq3 = D[C3[x, t], t] == D1 D[C3[x, t], {x, 2}];
Boundary Consitions
bc1 = C1[l, t] == Cs;
bc3 = C3[-l, t] == Cs;
Initial Conditions
ic1 = C1[x, 0] == 0;
ic2 = C2[x, 0] == 0;
ic3 = C3[x, 0] == 0;
Interface Conditions
icm12 = C1[a, t]/Cs == C2[a, t]/Ci;
icm32 = C3[-a, t]/Cs == C2[-a, t]/Ci;
icl12 = D1 D[C1[a, t], x] == D2 D[C2[a, t], x];
icl32 = D1 D[C3[-a, t], x] == D2 D[C2[-a, t], x];Ihtisham Khalid2018-10-18T18:04:44ZIllustrate the central limit theorem with Wolfram Language?
http://community.wolfram.com/groups/-/m/t/1521106
My statistics teacher asked us to generate 100,000 samples of normal, exponential, and binomial distributions of size 1000 each. For each sample he wants us to calculate the mean (100,000 means) and draw a histogram of the 100,000 means.
He also wants us to compute the the mean and standard deviation of the 100,000 means.
I'm not very experienced in Mathematica, does anyone know how to go about doing this?Joshua Denton2018-10-18T22:44:02Zdouble integral of four parameter expression
http://community.wolfram.com/groups/-/m/t/1522428
I have tried to solve this problem using mathcad and Mathematica,but i didnt get a solution
Fisher information matrix should be positive.because diagonal values must be positive. can u please try this for mesumi ar2018-10-19T16:27:05ZI2C connected to WM Raspberry to / from WM Desktop help
http://community.wolfram.com/groups/-/m/t/1522036
I am intested to connect, capture and process an Image from a sensor with a I2C protocol . I know that the RaspberryPi WM may connect to the device, but the small Raspberry device does not have the computational power to process the video delivered by the image sensor device.
It it possible that my p W Mathematica desktop command the I2C image sensor and draw the image for processing from the desktop mathematica?Jose Calderon2018-10-19T11:42:07Z[✓] Get the derivative of the following pure function?
http://community.wolfram.com/groups/-/m/t/1521607
I want to realize the derivative of a function.
![enter image description here][1]
I use the pure function to realize it, but it runs very slowly and the result seems weird.
![enter image description here][2]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=QQ%E5%9B%BE%E7%89%8720181019124900.png&userId=586844
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=QQ%E5%9B%BE%E7%89%8720181019125011.png&userId=586844Zhonghui Ou2018-10-19T04:54:26Z[GIF] J34 (Hopf projection of the 600-cell)
http://community.wolfram.com/groups/-/m/t/1521244
![Hopf projection of the 600-cell][1]
_J34_
This shows a rotating 600-cell under the Hopf map. At least for the particular choice of coordinates I'm using, each of the 120 vertices of the 600-cell lies in the same complex line as 3 others, so the initial projection only has 30 vertices (in fact, it is the [pentagonal orthobirotunda][2]). With this particular rotation, two pairs split off before recombining.
Here's the Hopf map, along with the [smoothstep function][3]:
Hopf[{x_, y_, z_, w_}] := {x^2 + y^2 - z^2 - w^2, 2 y z - 2 w x, 2 w y + 2 x z};
smoothstep[x_] := 3 x^2 - 2 x^3;
And the vertices of the 600-cell, defined partially in terms of the vertices of the 8-cell and the 16-cell:
eightcellvertices = Normalize /@ {-1, -1, -1, -1}^# & /@ Tuples[{0, 1}, 4];
sixteencellvertices = Normalize /@ Flatten[Permutations[{-1, 0, 0, 0}]^# & /@ Range[1, 2], 1];
six00cellvertices = Join[sixteencellvertices, 1/2 eightcellvertices,
Flatten[
Outer[
Permute, (1/2 {GoldenRatio, 1, 1/GoldenRatio, 0}*{-1, -1, -1, 0}^Append[#, 1] & /@ Tuples[{0, 1}, 3]),
GroupElements[AlternatingGroup[4]],
1],
1]
];
And, finally, here's the animation:
With[{pts = six00cellvertices, viewpoint = 2 {1, 0, 0},
cols = RGBColor /@ {"#c3f1ff", "#f87d42", "#00136c"}},
Manipulate[
Graphics3D[
Table[
Sphere[Hopf[RotationMatrix[2 π/5 smoothstep[t], pts[[{5, 27}]]].pts[[i]]], .2],
{i, 1, Length[pts]}],
PlotRange -> 1.2, ViewAngle -> π/7, Boxed -> False,
ImageSize -> 540, ViewPoint -> viewpoint,
Background -> cols[[-1]],
Lighting -> {{"Spot", cols[[1]], {{0, 0, -.75}, {0, 0, 1}}, π/2},
{"Spot", cols[[2]], {{0, 0, .75}, {0, 0, -1}}, π/2},
{"Ambient", cols[[-1]], viewpoint}}],
{t, 0, 1}]
]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sphere22q.gif&userId=610054
[2]: https://en.wikipedia.org/wiki/Pentagonal_orthobirotunda
[3]: https://en.wikipedia.org/wiki/SmoothstepClayton Shonkwiler2018-10-19T03:09:23ZSolve Laplace's equation with a boundary condition?
http://community.wolfram.com/groups/-/m/t/1520613
Is there a trick to make Mathematica solve with one boundary condition?
▽^2u=0
BC : u(x,0)=0, u(x,a)=0, u(0,y)=0, y(b,y)=100ºC
Show me distribution chart to assume 0< a <100cm, 0< b <100cm in steady state.Jaeyeol Chung2018-10-18T17:22:20ZGet prediction intervals of parameters on GLM Binomial models?
http://community.wolfram.com/groups/-/m/t/1520930
Using Binomial data we need to determine predicational intervals on x at specific probabilities (Y). Enclosed is code that produces a visual representation of example fitted data but not the + and - 95% prediction values of x. The image of the plot (copy included) indicates the two points we need to determine.Terry Acree2018-10-18T19:52:27ZThe Octagonal Dodecahedron
http://community.wolfram.com/groups/-/m/t/1520664
On 17 October 2018, [Ivan Neretin discovered the octagonal dodecahedron](https://math.stackexchange.com/questions/2869725/), a toroid made from twelve octagons.
**4**, 6, 8 triangles can make a tetrahedron and up. The [Snub Disphenoid](http://mathworld.wolfram.com/SnubDisphenoid.html) has 12 faces.
**6**, 8, [9](https://en.wikipedia.org/wiki/Herschel_graph), 10 quadrilaterals can make a cube and up. The [Rhombic Dodecahedron](http://mathworld.wolfram.com/RhombicDodecahedron.html) has 12 faces.
**12**, 16, 18, 20 pentagons can make a [tetartoid](http://demonstrations.wolfram.com/TheTetartoid/) or dodecahedron [and up](https://math.stackexchange.com/questions/1609854/).
**7**, 8, 9, 10 hexagons can make make a [Szilassi toroid](http://demonstrations.wolfram.com/TheParametrizedSzilassiPolyhedron/) and [up](http://dmccooey.com/polyhedra/ToroidalRegularHexagonal.html).
**12**, 24 heptagons can make a [heptagonal dodecahedron](http://dmccooey.com/polyhedra/HigherGenus.html) or [Klein quartic 3-torus](http://mathworld.wolfram.com/KleinQuartic.html).
**12** octagons can make an octagonal dodecahedron.
![octagonal dodecahedron][1]
So how did I make that picture? First, I looked through the [Canonical Polyhedra](https://datarepository.wolframcloud.com/resources/Canonical-Polyhedra) resource object for the outer polyhedron. The index turned out to be "8_9".
ResourceObject["Canonical Polyhedra"]
ResourceData["Canonical Polyhedra"][["8_9"]]
It's a geometric object with constraints since it's a [canonical polyhedron](http://demonstrations.wolfram.com/CanonicalPolyhedra/). My WTC talk [Narayama's Cow and Other Algebraic Numbers](https://wtc18.pathable.com/meetings/895905) discussed how to use algebraic number fields to simplify geometrically constrained objects.
1. Get two or more points to simple fixed values.
2. Use RootApproximant[] on remaining points.
3. If remaining points have the same value for NumberFieldDiscriminant[coord^2], the object is in an algebraic number field.
Would the technique I suggested help to make the new object? Turns out it did.
I took the points from "8_9", kept the center at (0,0,0), found an EulerMatrix[] to forced the midpoints of two opposing edges to (0,0,1),(0,0,-1) and force those two edges to be parallel to the x,-y axes.
After using Chop[] in various ways to get 0, 1, and -1 values, I used RootApproximant[] on everything else, then looked at NumberFieldDiscriminant[coord^2] on all reasonable seeming values. The discriminant -104 turned out a lot, and soon I had all coordinates using the algebraic number field based on Root[#^3 - # - 2 &, 1].
I've found these functions useful for algebraic number fields.
FromSqrtSpace[root_, coord_] := Module[{ dim, degree, vector},
dim = Dimensions[coord];
degree = {1, 2}.NumberFieldSignature[root];
vector = (root^Range[0, degree - 1]);
Map[With[{k = (#).vector}, RootReduce[Sign[k] Sqrt[Abs[k]]]] &, coord, {Length[dim] - 1}]];
ToSqrtSpace[root_, coord_] := Module[{dim, order, algebraic},
dim = Dimensions[coord];
order = {1, 2}.NumberFieldSignature[root];
algebraic = Map[Function[x, ToNumberField[Sign[x] RootReduce[x^2], root]], coord,{Length[dim] - 1} ];
Map[Function[x, If[Head[x] === AlgebraicNumber, Last[x], PadRight[{x}, order]]], algebraic, {Length[dim]} ]];
The algebraic number field coordinates, actual coordinates, and faces.
valsV={{{0,1/2,-1/4},{0,0,0},{-1,0,0}},{{-2,0,1},{0,-2,1},{-1,2,-1}},{{0,2,-1},{2,0,-1},{1,-2,1}},{{0,2,-1},{-2,0,1},{1,-2,1}},{{-2,0,1},{0,2,-1},{-1,2,-1}},{{0,-1/2,1/4},{0,0,0},{-1,0,0}},{{0,0,0},{0,1/2,-1/4},{1,0,0}},{{0,0,0},{0,-1/2,1/4},{1,0,0}},{{2,0,-1},{0,2,-1},{-1,2,-1}},{{2,0,-1},{0,-2,1},{-1,2,-1}},{{0,-2,1},{-2,0,1},{1,-2,1}},{{0,-2,1},{2,0,-1},{1,-2,1}}};
p89v = FromSqrtSpace[Root[#^3 - # - 2 &, 1], valsV];
p89F={{1,2,3,4,5},{2,10,12,8,3},{4,7,11,9,5},{6,9,11,12,10},{1,5,9,6},{1,6,10,2},{3,8,7,4},{7,8,12,11}};
Code for the initial picture.
reg=RegionBoundary[RegionDifference[ConvexHullMesh[p89v],ConvexHullMesh[With[{a=.7, b=.6, c=.9},{{a,b,c}, {-a,-b,c},{-b,a,-c}, {b,-a,-c} }]]]];
DiscretizeRegion[reg,MeshCellStyle->{{2,All}->Opacity[.7]}, SphericalRegion-> True, ImageSize-> 600, ViewAngle-> Pi/10]
Showing the original polyhedron and subtracted tetrahedron.
Graphics3D[{EdgeForm[Thick], Opacity[.8], GraphicsComplex[p89v, Polygon[p89F]],
With[{a = .7, b = .6, c = .9}, Polygon[Subsets[{{a, b, c}, {-a, -b, c}, {-b, a, -c}, {b, -a, -c} }, {3}]]]}, Boxed -> False, SphericalRegion -> True, ViewAngle -> Pi/9]
![octagonal dodecahedron][2]
Might be possible to remove the canonical sub-polyhedron constraint and add a constraint that the octagons all have unit area. Or to minimize the ratio of largest/smallest edge.
If you'd like a hexagonal dodecahedron, here's a simple one.
DiscretizeRegion[RegionBoundary[RegionDifference[Region[Cuboid[{0, 0, 0}, {3, 3, 3}]],
RegionUnion[Region[Cuboid[{0, 0, 0}, {2, 2, 2}]], Region[Cuboid[{1, 1, 1}, {3, 3, 3}]]]]],
MaxCellMeasure -> {"Area" -> 0.001}, AccuracyGoal -> 8, PrecisionGoal -> 8]
![hexagonal dodecahedron][3]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=octagonaldodecahedron.jpg&userId=21530
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=octagonaldodecbuild.jpg&userId=21530
[3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=hexagonaldodecahedron.jpg&userId=21530Ed Pegg2018-10-18T21:43:37ZRandomness of the number C[10]!, a candidate for replace Pi (random basis)
http://community.wolfram.com/groups/-/m/t/1485074
Hello people of the community, I'm an enthusiast of **Mathematica** and **Wolfram|Alpha** who's been busy for the last few days with a project on possible numerical candidates to be used as random alternative bases for various applications. As I know there are amazing mathematical friends in the community, I decided to humbly expose my work and ask about opinions, etc. Only for the purpose of presenting some of my ideas and also to start an informal discussion on this kind of subject: number randomness. And maybe it can also be useful for someone here.
To begin with, I understand that the randomness that I speak in this text is not truly random, but it serves as the basis for almost-random operations and distributions that need that specific degree of trust.
In order to study the randomness of the transcendental numbers, candidates for transcendental and notable irrational numbers, I used a table base and developed a digit counting workbook. I only used numbers with 10000 decimal digits for the study (generated using **Mathematica** and the data later adapted to data workbook). Below is the example of the interface I used with the Pi number:
![enter image description here][1]
Each workbook of data like this above is a point on a chart, that is, many similar to this will result in the characteristic curve of each number review.
In this study I compared four different specific characteristics (Y-axis). Using the workbook I could detail these quantities as the digits increased to 10000 on the X-axis. I used the transcendental number Pi to start the study. In this study I made my own version of properties to study the numbers and are not necessarily the conventional way of doing it. Given:
C = Deviation of the average arithmetic between all the decimal digits in the range.
S = Deviation of the average count of different digits: how many nine, how many 8 etc...
T = It measures the difference of how many numbers are between 0 and 4 in contrast to those between 5 and 9, such as a coin toss, result between rounding up or down situations.
A = Total number of digits forming or part of doubles, triples, etc.: 11,222,5555, 333333333... (in the interval studied).
I've tested several numbers and their combinations. As for example: **E^Pi, Pi^E, E^sqrt(2), 2^sqrt(2), Zeta (3), Gamma(1/3), Ln(2), Ln(Pi), E^(1/Pi), E+Pi, GoldenRatio, EulerGamma, E+Ln(2)+EulerGamma**, etc... around 30 different numbers, preferably transcendentals, irrational and other notorious candidates. There are two types of accuracy in this project, some I made with with 31 data points and some more detailed with 91 data points.
Below is the detailed graph of **Pi** referring to the characteristics already stipulated:
![enter image description here][2]
In this graph each vertical line is one point to the curve and has a separation of 110 digits, there are 91 points from 100 to 10000 digits on the X-axis.
Below are a few more examples with other notable numbers:
E Number
![enter image description here][3]
Gamma(1/3) Number
![enter image description here][4]
Ln(2) Number
![enter image description here][5]
Each of these charts above have the space between the vertical lines of 330 digits (X-axis) and use 31 points between 100 and 10000. They represent the characteristic curve of each number (Y-axis).
Note 1: Realize that the closer to the X-axis are the curves, in all graphics, the more well distributed and favored is the number for its use in random applications.
Then the following: I calculated the **AREA** below the curve in the graphs to characterize each of its value. The method I used was to calculate the area through average trapezoids formed by the arithmetic mean, so consequently I considered its own degree of precision.
Note 2: The important point in this study **IS NOT** the absolute values that I found (because I used a specific method), **BUT** the comparison of the values between the different numbers, since I used the same process in all objects of study, making it possible to compare. Below is the table for four important numbers using the accuracy of 31 points.
![enter image description here][6]
The Pi number has the lowest frequency to form repetitions of ALL the numbers tested (..would that be the manifestation of it irrationality?).
Well, after a sequence of tests and more tests, in this quest to find candidates equal or almost good as Pi in this characteristic, I found by chance a very good candidate number: the number **C (10)!** , or **ChampernowneNumber(10)!** (! = factorial):
I used **Mathematica** to generate the test numbers (examples):
![enter image description here][7]
In this example above are the first 500 digits of the numbers C(10) and C(10)!, but in the real study I used 10000 digits (also generated by **Mathematica**).
Examples of digit count according to the amount of total digits. The left is the C (10)! And the right is Pi:
![enter image description here][8]
Below is the result of the workbook I generated for the C (10)! using 31 points of precision:
![enter image description here][9]
Full chart of Champernowne (10)! (now with 91 points, 110 in 110 digits, 100 to 10000):
![enter image description here][10]
![enter image description here][11]
Comparing the data I got for Pi e C(10)! numbers (max accuracy, chart of 91 points):
![enter image description here][12]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Pigraph0.jpg&userId=1316061
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Pigraph1.jpg&userId=1316061
[3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=e.jpg&userId=1316061
[4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=gamma13.jpg&userId=1316061
[5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ln2.jpg&userId=1316061
[6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=tablei.jpg&userId=1316061
[7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=champernowneini.jpg&userId=1316061
[8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=tabledual.jpg&userId=1316061
[9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=tablei2.jpg&userId=1316061
[10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=champernowne!.jpg&userId=1316061
[11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=tablef.jpg&userId=1316061
[12]: http://community.wolfram.com//c/portal/getImageAttachment?filename=conclusao.jpg&userId=1316061
I conclude that: of all the numbers tested (transcendental, irrational, etc.) the number that has the characteristic of not-repeating-numeral to those of Pi is the **ChampernowneNumber (10)**! : a possible candidate to replace it in applications that need randomness and it IS NOT possible or convenient to incorporate Pi (is that a best alternative candidate? ). Currently I take 2 minutes to do a fast previous checkup on any number with the workbook, 1 hour to create and analyze completely with the chart 31 points and 3 hours for the chart of 91 points.
Please if you liked the work I did let me know giving a LIKEClaudio Chaib2018-09-29T21:29:53ZGet the Integrate[1-Erf[1]^2-E^(-Sec[t]^2),{t,0,Pi/4}] ?
http://community.wolfram.com/groups/-/m/t/1519982
Consider the following code:
Integrate[1-Erf[1]^2-E^(-Sec[t]^2),{t,0,Pi/4}]
returns itself and N[...] returns -7.730361489821647*^-17, while it's actually zero as can be proved. Will WolframAlpha and Machematica support such kind of thing?123 3452018-10-18T17:06:19ZSolve the following equation with Integrate or DSolve?
http://community.wolfram.com/groups/-/m/t/1520100
Hello folks,
Think of an equation: -g+K*v=D[v]/D[t] and the conditions are when t=0, v=0; where t is time v is velocity, g is a gravitational acceleration and K is some constant. How do you input these on Mathematica so it could take the integral of the equation and gives result. I already got the result by hand as follows: v=(g*(1-e^(k*t))/K). whatever I try I cant get this result.
Thanks in advance.Najmiddin Nasyrlayev2018-10-18T14:46:37ZIntegrate Tanh(x)*Cos(x) and get rid of the hypergeometric terms?
http://community.wolfram.com/groups/-/m/t/1519418
how to remove hypergeometricSachin V2018-10-18T10:09:25ZMathematica no longer available for the Raspberry Pi?
http://community.wolfram.com/groups/-/m/t/1511397
EDIT 2: As noted below, the problem is now resolved.
----
EDIT and warning: If you have Mathematica on the Raspberry Pi right now, do not uninstall at this point.
----
Mathematica is no longer included in the Raspbian repositories or the default Raspbian image. The Mathematica and Wolfram Language sections of the Raspberry Pi forum have been purged—apparently gone for good.
I uninstalled it, planning to reinstall a newer version, and it seems that now I lost it permanently.
Are there plans to make it available again?
There's also [a thread about this on the Raspberry Pi forums](https://www.raspberrypi.org/forums/viewtopic.php?t=224629). People speculate that Wolfram no longer licenses Mathematica for Raspbian, which seems strange/doubtful to me given that [11.3 for the RPi was released just 3 months ago](http://community.wolfram.com/groups/-/m/t/1349489), i.e. development seems to be ongoing.
Can anyone from Wolfram comment please?Szabolcs Horvát2018-10-14T14:56:10ZCorrelation of elements in time series
http://community.wolfram.com/groups/-/m/t/1518622
>Let $y_t = 0.8y_{t-1} + \epsilon_t$ where $\mathbb{E}[\epsilon_t] = 0$ and $\mathrm{Var}[\epsilon_t] = 1$. The time series is a strictly stationary sequence and each element is normally distributed. Hence $\mathbb{E}[y_t]$ and $\mathrm{Var}[y_t]$ are both constants. In particular, $\mathbb{E}[y_t]$ = $\mathbb{E}[y_{t-1}]$ and $\mathrm{Var}[y_t]$ = $\mathrm{Var}[y_{t-1}]$. Let $\rho(T)$ be the correlation between $y_t$ and y_{t-1}. Find $\rho(1)$ and $\rho(2)$.
Here is what I did for ρ(1):
ρ(1) = Corr(y<sub>t-1</sub>, y<sub>t</sub>) = Cov(y<sub>t</sub>, y<sub>t-1</sub>) / (σ<sub>y<sub>t</sub></sub> * σ<sub>y<sub>t-1</sub></sub>)
Cov(y<sub>t</sub> , y<sub>t-1</sub>) = Cov(y<sub>t-1</sub>, 0.8y<sub>t- 1</sub>+ε<sub>t</sub>) = 0.8Cov(y<sub>t-1</sub>, y<sub>t-1</sub>) + Cov(y<sub>t-1</sub>, ε<sub>t</sub>)
= 0.8Var(yt-1)+ E((y<sub>t-1</sub> - (0.8y<sub>t-1</sub>))(ε<sub>t</sub> - E(ε<sub>t</sub>))) = 0.8Var(y<sub>t-1</sub>) + E((0.2y<sub>t-1</sub>)(ε<sub>t</sub>))
= 0.8Var(y<sub>t-1</sub>) + 0.2E(y<sub>t-1</sub>)E(ε<sub>t</sub>) = 0.8Var(y<sub>t-1</sub>)
=>√((0.8Var(y<sub>t-1</sub>)))<sup>2</sup> / Var(y<sub>t-1</sub>)<sup>2</sup>)= √0.8 = 0.8944
Did I do this right and if so, wouldn't ρ(2) be the same thing? I was also confused as to how $\mathbb{E}[y_t]$ could be equal to $\mathbb{E}[y_{t-1}]$ when $\mathbb{E}[y_t]$ = 0.8$\mathbb{E}[y_{t-1}]$Nicholas Soteropoulos2018-10-17T20:48:18ZFinding a continuous function that minimizes an integral expression
http://community.wolfram.com/groups/-/m/t/1518788
I am trying to find a continuous function $x(t)$ defined over non-negative real numbers that minimizes the expression below:
>$$\frac{\nu y_1 + (1-\nu)y_2}{y_0}$$
where
- $\displaystyle \nu = \int_{0}^{\infty} (1-x(t)) f'(t) dt$,
- $\displaystyle y_0 = \int_{0}^{\infty} (1-f(t))(1-x(t)) dt$,
- $\displaystyle y_1 = \int_{0}^{\infty} (1 - \frac{x(t)}{C_1 x(t) + 1}) dt$,
- $\displaystyle y_2 = C_2$,
$C_1$ and $C_2$ are positive real constants,
$f(t)$ is a probability density function. $f(t)$ is differentiable everywhere. And I need to find a function $x(t):\mathbb{R^+}\cup \{0\}\to\mathbb{R^+}$.
I tried to see whether the Euler equation from the calculus of variations can help. However I could not find a way to progress.omer subasi2018-10-17T22:36:03ZWhat is the default precision of ` when not specifying a digit after it?
http://community.wolfram.com/groups/-/m/t/1518918
If the symbol ` has no digits after it, what is the precision of the number understood to be?
Here is a the sample code:
DKReplace = {70.6`, 74.2`, 80.1`, 75.3`, 55.6`, 55.5`, 62.6`, 64.9`,
80.1`, 102.5`};
Thank you,
BenoitBenoit Cordoba2018-10-17T23:43:08ZCreate an interface for a drinks vending machine?
http://community.wolfram.com/groups/-/m/t/1518375
Hello everyone, if someone were available, I would need a hand in the making of a mathematical machine, I thought to realize the interface of a distributor of drinks that tells me to enter the money, select the code concerning the drink and then, in based on the money inserted, give me rest if the cost of the drink is lower than what is entered. However, since I should use wolfram mathematica I do not know how to set the algorithm, as I am not very familiar with this program.
See the following code:
stringa1 = "Inserire soldi:";
stringa2 = "Inserire codice bibita:";
Column[{{InputField[stringa1, String],
InputField[Dynamic[beta], Number],
Button["Clicca qui",
Print[InputField[stringa2, String],
InputField[Dynamic[alph], String]]]}}]
If someone would give me a hand I would do a big favor .... thanks in advance.Pasquale Rossi2018-10-17T20:06:52ZGet the Real part of a complex function with ComplexExpand and Re?
http://community.wolfram.com/groups/-/m/t/1511141
So I declare a complex function r[w] and I want to create another function U[w] which is defined by the real part of r[w]. So I try to use the embedded Re[] function but it returns a weird expression.
r[w]=200/(I*w*(10*I*w + 1))
If I do ComplexExpand[r[w]] I get -(2000/(1 + 100 w^2)) - (200 I)/(w (1 + 100 w^2)).
So I know that U[w] should be -(2000/(1 + 100 w^2)).
But the Re[r[w]] function returns 200 Im[1/((1 + 10 I w) w)]. Simplifying this expression by using Simplify[] and FullSimplify[] wouldn't help (even assuming that w is Real).
So how do I get the real and the imaginary part of my complex function r[w]?Daniel Voloshin2018-10-14T09:23:12ZTwelve Prisms
http://community.wolfram.com/groups/-/m/t/1517102
My friend Gianni Sarcone recently built a 12 prism construction.
![twelve prisms][1]
So I had to build one myself. I also built in in Mathematica. To my surprise, I was able to simplify it down to three points.
base={{4,4,7},{3,6,6},{2,5,8}};
prismp=Join[base,-(Reverse/@base)];
prismf={{1,2,3},{4,5,6},{1,2,4,5},{1,3,6,5},{2,3,6,4}};
tetrahedralGroup ={{{-1,0,0},{0,-1,0},{0,0,1}},{{0,-1,0},{0,0,1},{-1,0,0}},{{0,0,1},{-1,0,0},{0,-1,0}},{{0,0,-1},{1,0,0},{0,-1,0}},{{0,1,0},{0,0,-1},{-1,0,0}},{{1,0,0},{0,1,0},{0,0,1}},{{0,-1,0},{0,0,-1},{1,0,0}},{{-1,0,0},{0,1,0},{0,0,-1}},{{0,0,1},{1,0,0},{0,1,0}},{{1,0,0},{0,-1,0},{0,0,-1}},{{0,0,-1},{-1,0,0},{0,1,0}},{{0,1,0},{0,0,1},{1,0,0}}};
Graphics3D[{Opacity[.8],Table[Polygon[prismp[[#]].tetrahedralGroup[[n]]]&/@prismf,{n,1,12}]}, Boxed-> False, SphericalRegion->True,ImageSize-> {800,800},ViewAngle-> Pi/9]
![twelve prisms][2]
Maybe try out ViewAngle -> Pi/600, ViewPoint -> {200, 0, 0}
![12 prisms from far away][3]
Sweet.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=twelveprisms.jpg&userId=21530
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=12prismWL.jpg&userId=21530
[3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=12prismfar.jpg&userId=21530Ed Pegg2018-10-16T22:24:27ZAlgorithmic Information Dynamics Course
http://community.wolfram.com/groups/-/m/t/1491903
The [Algorithmic Information Dynamics course][1] promoted and distributed by the Santa Fe Institute is coming to an end. Sponsored by Wolfram Research, the course students made heavy use of the **Wolfram Language** to follow lectures, read, write and share code from the cloud. This has been an enriching experience for both instructors and students and people may want to share their thoughts about it.
[![enter image description here][2]][1]
### **About the Course:**
Probability and statistics have long helped scientists make sense of data about the natural world — to find meaningful signals in the noise. But classical statistics prove a little threadbare in today’s landscape of large datasets, which are driving new insights in disciplines ranging from biology to ecology to economics. It's as true in biology, with the advent of genome sequencing, as it is in astronomy, with telescope surveys charting the entire sky.
The data have changed. Maybe it's time our data analysis tools did, too.
During this three-month online course, starting June 11th, instructors Hector Zenil and Narsis Kiani will introduce students to concepts from the exciting new field of Algorithm Information Dynamics to search for solutions to fundamental questions about causality — that is, why a particular set of circumstances lead to a particular outcome.
Algorithmic Information Dynamics (or Algorithmic Dynamics in short) is a new type of discrete calculus based on computer programming to study causation by generating mechanistic models to help find first principles of physical phenomena building up the next generation of machine learning.
The course covers key aspects from graph theory and network science, information theory, dynamical systems and algorithmic complexity. It will venture into ongoing research in fundamental science and its applications to behavioral, evolutionary and molecular biology.
[1]: https://www.complexityexplorer.org/courses/63-algorithmic-information-dynamics-a-computational-approach-to-causality-and-living-systems-from-networks-to-cells
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2018-10-10at4.41.08PM.png&userId=20103Hector Zenil2018-10-03T09:15:56ZSolve a coupled second order differential equations of two variables?
http://community.wolfram.com/groups/-/m/t/1511565
Hello friends!!
I want to solve coupled two second order and one first order differential equations of two variables
and want to plot 3D graph. My code is attached and it is giving errors.
Kindly help me to remove the errors.shivi sv2018-10-14T15:01:18ZOutput error
http://community.wolfram.com/groups/-/m/t/1511197
I am new to Mathematica and still learning the language. I have question involving a mass -spring system and need to solve a second order ODE for multiple points at multiple times but can't write it properly. Please help the question and code written is attached.![enter image description here][1]Areeb Qureshi2018-10-14T14:37:36ZSet up a ColorFunction on the following DensityPlot?
http://community.wolfram.com/groups/-/m/t/1511933
Hi,
I have a function, say f[x,y] that can return only 3 values: +1, 0, and -1 (it is similar to Sign, but comes from stability analysis of a control system with 2 state variables) I would like to use DensityPlot so that +1, 0 and -1 map to red, white and blue, respectively, over a specified (x,y) plot region Question: how do I set ColorFunction to achieve that mapping? The plot statement is simply
DensityPlot [f[x,y],{x,min,max},{y,min,max}, PlotPoints->50, ... ]
where ... are additional options.Carlos Felippa2018-10-15T00:06:38ZPseudo-Dynamic Approach to the Numerical Solution of Nonlinear PDEs
http://community.wolfram.com/groups/-/m/t/1516751
New *THE MATHEMATICA JOURNAL* article:
----------
[Pseudo-Dynamic Approach to the Numerical Solution of Nonlinear Stationary Partial Differential Equations][1]
--------------------------------------------------------------------
*by ALEXEI BOULBITCH*
--------------------------------------------------------------------
ABSTRACT: This article presents a numerical pseudo-dynamic approach to solve a nonlinear stationary partial differential equation (PDE) *S* with bifurcations by passing from *S* to a pseudo-time-dependent PDE *T*. The equation *T* is constructed so that the desired nontrivial solution of *S* represents a fixed point of *T* . The numeric solution of *S* is then obtained as the solution of *T* at a high enough value of the pseudo-time.
- [Read full text »][2]
- [Submit an article »][3]
![enter image description here][4]
[1]: http://www.mathematica-journal.com/2018/10/pseudo-dynamic-approach-to-the-numerical-solution-of-nonlinear-stationary-partial-differential-equations/
[2]: http://www.mathematica-journal.com/2018/10/pseudo-dynamic-approach-to-the-numerical-solution-of-nonlinear-stationary-partial-differential-equations/
[3]: http://www.mathematica-journal.com/submit-article/
[4]: http://www.mathematica-journal.com/data/uploads/2018/10/Boulbitch_Output_1.gifModeration Team2018-10-16T18:22:53ZGet right transformation of a uniform distribution leading to a Pareto one?
http://community.wolfram.com/groups/-/m/t/1515688
Hello,
this is a question about the transformation of a uniform distribution leading to a "standard" Pareto one.
Here are two formulas A and B (densities) resulting from this transformation:
A[v_] := (1/D[1/u^(1/a), u]) /. u -> 1/v^a
D[1/u^(1/a), u] // InputForm // Print
B[v_] := -(u^(-1 - 1/a)/a) /. u -> 1/v^a
B is correct, while A is not (does not integrate to 1 on [1,Infinity[ ). Why?
Regards,
ClaudeClaude Mante2018-10-16T13:23:07ZUse an exponential model to define a function?
http://community.wolfram.com/groups/-/m/t/1515426
Hello,
I have created exponential and logistic models, but I do not know how to define a function for them and solve the following problems. I went to math lab tutors multiple times, and nobody knew how to solve them, even after browsing for various commands in the mathematica library. If anyone could help me solve these, I would really really appreciate it. I have already created the code for the plots.Keanu Davis2018-10-16T05:08:47ZSolve system of 2nd order ODE?
http://community.wolfram.com/groups/-/m/t/1513818
New to Mathematica. Need to plot the position and velocity of 14 points. 2 are fixed 12 are in the form of a system of equations. what mistake am I making?
g = 10;
ic1 = {y[x, 0] == 0}
bc = {y[-1/2, t] == 0, y[1/2, t] == 0}
system = Table[
D[y[x, t], {t,
2}] == -100 (2*(y[x, t]) - y[x - 1/13, t] - y[x + 1/13, t]) -
10 ((2*D[y[x, t], {t, 1}]) - D[y[x - 1/13, t], {t, 1}] -
D[y[x + 1/13, t], {t, 1}]) + g, {x, -1/2 + 1/13, 1/2 - 1/13,
1/13}]
functions = Table[y[x, t], {x, -1/2, 1/2, 1/13}]
DSolve[{system, bc, ic1}, functions, t]Areeb Qureshi2018-10-15T15:29:11ZWhich version of Mathematica is available on Raspberry Pi ?
http://community.wolfram.com/groups/-/m/t/1349489
Hello,
I recently added Mathematica on my Raspberry 3 (originally with Raspbian Lite), and got the 11.0.1.
Any attempt to get the 11.2 version by a classical upgrade process
sudo apt-get dist-upgrade wolfram-engine
just answers that I am up-to-date... However I can read in the group lot of posts concerning 11.2 !
How can I get it ? I wouldn't like to reinstall Raspbian, as it is a special image.
Thank you for your help,
Yvesyves papegay2018-05-31T13:46:34ZMake a function that can find the 3 rod of a number?
http://community.wolfram.com/groups/-/m/t/1511774
Here you can see my code, as it is for now. Must admit, I'm kinda lost why it doesn't work. I think there is something about the syntax I'm not understanding.
Best regards,
kobikrod2[x0_] := Module[{xny, xgl},
xs = If[Positive[x0], xs = N[x0], Print["Tallet er ikke positivt"]]
xgl = xs // 2 ;
xny++ 1 = 1/3 (2*xgl + (xs/xgl^2));
While[xny != xgl, xgl = xny;
xny = xgl + 1 = 1/3 (2*xgl + (xs/xgl^2))];
xny]Martin Friis2018-10-14T20:11:48ZInterface with Arduino mega in Mathematica?
http://community.wolfram.com/groups/-/m/t/1514918
I am currently attempting to interface with Arduino mega but the basic Arduino functions don't work as they are not specifically for the mega. Any way I can use a serial device open or something else to access this Arduino mega? The Arduino would be used to control stepper motors and other little things. Any tips would be of great help.Adriel Rios Nieves2018-10-15T20:12:18ZLinguistics Curator
http://community.wolfram.com/groups/-/m/t/1514714
Wolfram|Alpha is seeking a Linguistics Curator to join our Wolfram|Alpha Content Development team. We are looking for a creative individual with strong critical thinking, problem solving, and language skills. As a Linguistics Curator, you will be able to work in a flexible, productive, and fast-paced environment, contributing to the development and support of Wolfram|Alpha’s natural language understanding capabilities across a wide range of knowledge domains.
**Skills Required:**
- Fluency in written English (additional languages are a plus)
- Familiarity with and/or ability to assimilate technical jargon in
diverse specialized knowledge areas
- Basic programming experience (Wolfram Language preferred)
- Experience with content versioning systems (CVS, Git) is highly
desirable
**Location:** Champaign, Illinois
Wolfram is an equal opportunity employer and values diversity at its company. Women, people of color, members of the LGBTQ community, individuals with disabilities and veterans are strongly encouraged to apply.
Click [here][1] to apply!
[1]: http://www.wolfram.com/company/careers/opportunities/#op-93432-linguistics-curatorHolly Glenn2018-10-15T18:55:51ZSoftware Developer—Business Systems R&D
http://community.wolfram.com/groups/-/m/t/1514190
Wolfram, creator of Mathematica, Wolfram|Alpha and the Wolfram Language, has an exciting opportunity available for a Software Developer to join its Business Systems R&D team and assist with the ERP project. The ERP project is working on creating a new business system that will use the Wolfram technology stack on the company’s own Wolfram Enterprise Private Cloud. The candidate will need to be energetic about new, daily challenges, as this project is being built from the ground up. The candidate will also need to be open to working in a very collaborative environment. The job will involve working with all groups that use the company’s business data, including finance, sales, customer support, purchasing and more.
**Responsibilities:**
- Developing front end applications in the Wolfram Cloud
- Developing back end applications using the Wolfram Language
- Unit testing development efforts
- Performing peer code reviews
**Minimum qualifications:**
- Wolfram Language experience (2+ years)
- API development experience (2+ years)
- SQL experience (2+ years)
- Bachelor's degree in computer science, engineering, math, physics or
a related technical or quantitative field
**Preferred qualifications:**
- Familiarity with code source management methodologies and products,
specifically GIT Familiarity with databases, specifically Postgres
Business and/or system analysis experience
- Familiarity with financial and/or HR data
- Advanced Wolfram Language skills
- Experience in Java
**Location:** Champaign, Illinois
Wolfram is an equal opportunity employer and values diversity at its company. Women, people of color, members of the LGBTQ community, individuals with disabilities and veterans are strongly encouraged to apply.
Click [here][1] to apply!
[1]: http://www.wolfram.com/company/careers/opportunities/#op-214254-software-developerbusiness-systems-rdHolly Glenn2018-10-15T18:52:54ZOuter Billiards. How to create a test to skip triangle corner in for loop?
http://community.wolfram.com/groups/-/m/t/1487490
Hey Everyone! I'm currently working on a problem in a course on mathematical modeling concerning Outer Billiards. I'm supposed to write a program that does the following:
> Start with a ball (a point particle) somewhere outside an equilateral triangle with side length equal to 1. You have two possibilities here and you select one of them. When it arrives at the corner it has traveled a distance d1. Then the particle continues in the same direction as before the same distance d1 There it changes direction momentarily and moves towards the other corner. Then the procedure is repeated, at the second corner it has traveled a distance d2 and it continues in the same direction the same distance d2, etc.
One problem that I've encountered is that for some points the trajectory of the point particle crosses the interior of the triangle, which is not allowed. Therefore I would like to create a test inside of my for loop which says that: "IF the trajectory towards a corner crosses the interior of the triangle, move instead to the next corner." Now, my lecturer gave me a hint that one can use determinants in order to make a pretty easy test, but I find it somewhat hard to understand intuitively. So I would like to make another test, but I don't know how exactly. Here is the program that I'm working on:
corner = {{1/2, Sqrt[3] /2}, {0, 0}, {1, 0}};
ourtriangle = Triangle[{corner[[1]], corner[[2]], corner[[3]]}];
p0 = {2, 2};
plotpoints = {p0};
cornerindex = 1;
n = 3;
For[i = 1, i < n, i++,
p1 = 2*corner[[cornerindex]] - p0;
p0 = p1;
AppendTo[plotpoints, p1];
cornerindex = Mod[i, 3] + 1;
]
traj = Table[plotpoints[[i]], {i, n}];
plot1 = Graphics[{Dashed, Line[traj]}];
Show[plot1, Graphics[ourtriangle], Axes -> False]
This yields the following graph:
![enter image description here][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Project_1_FINAL.jpg&userId=1487470
So, in this case I would like the trajectory to instead move towards the right-most corner but I really dont know how. Could someone please give me at least a hint?
Thank you all.Victor Galeano2018-10-01T14:08:05ZHow can I completely simplify the result of "PiecewiseExpand" ?
http://community.wolfram.com/groups/-/m/t/1509500
![figure 1][1]
Hi, guys. How can I completely simplify the result of "PiecewiseExpand" in the picture? Because the first line of the result obviously does not exist. What I want to derive is that it disappears automatically if this result does not exist. In addition, do we have any code to realize the exact conditions of "true" ? Thank you very much!
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=123456.jpg&userId=178384EditProfile FillName2018-10-13T09:46:17ZSolve iteration for a cube root, by using For, While or Do?
http://community.wolfram.com/groups/-/m/t/1512199
You have a cube Root iteration:
Xi1 = 1/3*(2*Xi0 + n/(Xi0^2)), where i = 1,2,3,4,5
I want to use For, While or Do command...
How do I solve this?Zain Ahmed2018-10-15T04:55:11ZVisualize a root of one variable equation with Manipulate?
http://community.wolfram.com/groups/-/m/t/1497914
Hello. I am trying to visualize root of third degree one variable equation. Delta^3-C0*delta+2==0, C is between [0,10]. But there occurs an error. Could you help to fix this problem. Thanks a lot. Here is the code:
Manipulate[
f1 = \[CapitalDelta]0^3 - С*\[CapitalDelta]0 + 2;
sol1 = FindRoot[f1 == 0, {\[CapitalDelta]0, 0.9}];
Plot[ f1, {\[CapitalDelta]0, 0, 1}, PlotRange -> 0.1,
Epilog -> {{PointSize[0.03], Point[{\[CapitalDelta]0 /. sol1, 0}]},
Text["\!\(\*SubscriptBox[\(\[CapitalDelta]\), \(0\)]\)=", {0.75, \
-0.05}], Text[
ToString[N[\[CapitalDelta]0 /. sol1, 10]], {0.9, -0.05}]}]
, {C0, 0.1, 5}]Torebek Zhumabek2018-10-07T10:05:53ZIs there documentation on File/New/Package?
http://community.wolfram.com/groups/-/m/t/1511712
In the File menu there is an opportunity to open a file as a package using File/New/Package. That opens a specialized GUI with the option to run and debug code. When we look up documentation on this here is what we get:
![help entry][1]
Does anyone know the whereabouts of some useful documentation, or even a tutorial giving the intended use of this capability and an example?
Kind regards,
David
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1317Capture.PNG&userId=98179David Keith2018-10-14T16:13:12ZSpeed up evaluation of this integral?
http://community.wolfram.com/groups/-/m/t/1508724
I am trying to evaluate the integral
$$ \int_0^{2\pi}\frac{D_{11}^2+2D_{12}^2+D_{22}^2+D_{33}^2}{1+e\cos x(t)}dx $$
Where $D_{ij}$ are third derivatives wrt $t$ as defined below.
a[psi_] := k1/(1 + e*Cos[psi]);
d[psi_] := p1/(1 + e*Cos[psi]);
D11 = D[a[x[t]]*(Cos[x[t]]^2 - 1/3), {t, 3}];
D12 = D[a[x[t]]*Cos[x[t]]*Sin[x[t]], {t, 3}];
D22 = D[a[x[t]]*(Sin[x[t]]^2 - 1/3), {t, 3}];
D33 = D[-a[x[t]]/3];
To do this I have written the input
Assuming[Element[k1, Reals] && Element[e, Reals] &&
x'[t] == p2/(d[x[t]]^2) && Element[p2, Reals] &&
Element[p2, Reals],
Integrate[(D11^2 + 2*D12^2 + D22^2 + D33^2)/(1 + e*Cos[x[t]])^2, {x[
t], 0, 2*Pi}]]
This is taking a very long time to evaluate (has been running for hours), is it OK to specify to *Mathematica* that I have the condition $\dot{x}=\frac{p_2}{d(x(t))^2}$ in this manner? How could this be sped up?
This integral arose in the study of the loss of energy of an orbiting mass due to gravitational radiation.tom ri2018-10-12T18:24:18ZSubdividePoints
http://community.wolfram.com/groups/-/m/t/1511449
MIT's [MPB](https://mpb.readthedocs.io/en/latest/) and [MEEP](https://meep.readthedocs.io/en/latest/) programs have a very interesting function called **interpolate** (and a variant **kinterpolate-uniform**), which basically creates points between a set of points, working like the Mathematica's `Subdivide` function.
Unfortunately `Subdivide` does not work with more than two vectors, subdividing only the endpoints. We can easily extend this behavior with the new functions:
SubdividePoints[pts_List?MatrixQ, n_Integer] := Block[{pt},
pt = Flatten[Table[
pts[[i]]*(1-t) + pts[[i+1]]*t
, {i, Length@pts-1}, {t, Subdivide[0,1,n+1]}]
, 1];
pt = Delete[pt, Position[Norm /@ Differences@pt, 0]]
]
And the another one for a uniform coverage.
SubdividePointsUniform[pts_List?MatrixQ, n_Integer] := Module[{L, m, pt},
L = (Norm /@ Differences@pts);
m = Round[L/Min[L/n]];
pt = Flatten[Table[
pts[[i]]*(1-t) + pts[[i+1]]*t
, {i, Length@pts-1}, {t, Subdivide[0,1,m[[i]]+1]}]
, 1];
pt = Delete[pt, Position[Norm /@ Differences@pt, 0]]
]
A simple example of usage would be creating points in the Brillouin zone of a square:
pts = {{0,0}, {1,0}, {1,1}, {0,0}}/2;
SubdividePoints[pts, 3] // ListPlot
SubdividePointsUniform[pts, 3] // ListPlot
![img][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=2018-10-14_134741.png&userId=845022Thales Fernandes2018-10-14T16:49:39ZAvoid weird formatting of the following mathematical expressions?
http://community.wolfram.com/groups/-/m/t/1511150
For some reason Mathematica keeps returning dots in between variables and their coefficients. So instead of "1000s" I get "1000.s". And even more weird, instead of "2500" I get "2500.".
Why is it happening and how do I get rid of it?Daniel Voloshin2018-10-14T09:33:32ZSimulate the motion of the Earth around the Sun based on Kepler's Law?
http://community.wolfram.com/groups/-/m/t/1500089
I am using Mathematica 10.3. I want fo perform a computational analysis of the motion of the Earth around the sun based on Kepler’s laws.
Here is my code so far.
eulerStep[{t_, state_List}, h_, f_List] := {t + h,
state + h Through[f[{t, state}]]}
solveSystemEuler [{t0_state0 _}, h_, n_Integer, f_List] :=
NestList[eulerStep[#, h, f] &, {t0, state0}, n]
midptStep[{t_, state_List}, h_, f_List] := {t + h,
state + h Through[
f[{t + 1/2 h, state + 1/2 h Through[f[{t, state}]]}]]}
solveSytemMidPt[{t0_, state0_}, h_, n_Integer, f_List] :=
NestList[midptStep[#, h, f] &, {t0, state0}, n]
L = 1/2 m (x'[t]^2 + y'[t]^2) + GMm/Sqrt[x[t]^2 + y[t]^2];
D[D[L, x'[t]], t] - D[L, x[t]] == 0
D[D[L, y'[t]], t] - D[L, y[t]] == 0
xdot[{t_, {x_, vx_, y_, vy_}}] := vx
vxdot[{t_, {x_, vx_, y_, vy_}}] := -x/(x^2 + y^2)^(3/2)
ydot[{t_, {x_, vx_, y_, vy_}}] := vy
vydot[{t_, {x_, vx_, y_, vy_}}] := -y/(x^2 + y^2)^(3/2)
start = {1, 0, 0, 1};
fcns = {xdot, vxdot, ydot, vydot};
orbit = solveSystemEuler[{0, start}, 0.01, 800, fcns];
<< Statistics`DataManipulation`
xypts = Column[Column[orbit, 2], {1, 3}];
ListPlot[xypts, PlotJoined -> True];
Running the program gave the following error messages.
![enter image description here][1]
Please help me to fix my code.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture.JPG&userId=1499975Senlau Minto2018-10-08T03:45:10ZIs Mathematica 11 compatible with Mac OS Mojave
http://community.wolfram.com/groups/-/m/t/1479746
any problem with Mojave before I switch to it?michel2018-09-26T02:01:06ZPlot the following differential equation over a larger time window?
http://community.wolfram.com/groups/-/m/t/1510304
I am using differential equations to determine the rate of formation of certain compounds in an enzymatic reaction. I am having an issue however, when graphing the rate of formation of one of the compounds over 1,800 seconds (tmax) where I get a very strange graph that has many "jumps". However, this issue is resolved when I reduce the window of time to 30 seconds (tmax2). I believe that the program is having issues graphing the differential equation over the larger window of time. Is there any way I can resolve this or a better alternative to this?
Thank you very much,
NikNik Teodo2018-10-13T19:04:35ZUse external APIs and data wrangling?
http://community.wolfram.com/groups/-/m/t/1404817
Hi, I am considering using the Wolfram Cloud to host a project that makes use of API calls to a third party (never done production deployments in the WC before). The problem is that API calls (in the default way provided by the third party) contain metadata and even the key-value pairs included in the response need to be cleaned up (the only thing that is relevant to me is the last value, in the example below that would be the number 1.9082*^7). Is there any way to make the call so that just that value is extracted (or at least the list put in usable key-value dataset format?)? If not, what would be the most efficient way to clean up the output, to simply assign that value to a variable? The code will be making many simultaneous API calls, and I'll really prefer to avoid performance issues -not to waste too much computing power wrangling data. Thanks!
{meta->{request->{granularity->Daily,start_date->2018-01-27,end_date->2018-01-31,limit->Null },status->Success,last_updated->2018-07-31},value->{{date->2018-01-27,value->1.48229*^7},{date->2018-01-28,value->1.42697*^7},{date->2018-01-29,value->1.67565*^7},{date->2018-01-30,value->1.91857*^7},{**date->2018-01-31,value->1.9082*^7**}}}George W2018-08-14T05:33:17Z