Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Mathematics sorted by activeGet 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:27ZWhy is my implementation of a random network slower than the built-in?
http://community.wolfram.com/groups/-/m/t/1528378
Hello everybody,
I wanted for accademic purposes to implement the algorithm that generate a Random Graph of the Barabasi-Albert kind.
I know that there exsist already a built-in function that do exactly that, but for better understanding it I challenged myself to reproduce it.
I came up with this (relatively simple, but effective) code:
m0 = 2;(*How many edges to connect at each time step*)
n = 1000; \
(*How many nodes*)
g = CompleteGraph[m0, VertexLabels -> Automatic];
addBarabAlbert[g_Graph, m_Integer] :=
EdgeAdd[g,
Rule[m, #] & /@ RandomSample[VertexDegree@g -> VertexList@g, m0]]
Do[g = addBarabAlbert[g, i], {i, m0, n}]
Which I think it gives me a correct solution, in fact you can see from the code below that the degree of the vertexes follow a power-law of the same nature as the one generated with the built-in wolfram function.
The only problem is that my implementation is kind of slow (compared to the built-in) and I was wondering why.
Maybe knowing how I could set it up to make it faster will help me in the future with different problems.
Any ideas?
(In the attachment you find the brief code)Ektor Mariotti2018-10-22T23:32:50ZRandomness 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:53ZSolve 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}];Ihtisham Khalid2018-10-18T18:04:44ZCalculate a double 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 didn't get a solution
Fisher information matrix should be positive because diagonal values must be positive. Can you please try this for me?sumi ar2018-10-19T16:27:05ZSimulate 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:10ZFind what size grid could handle 4.3 x 10^17 seconds with Solve[] ?
http://community.wolfram.com/groups/-/m/t/1526408
This is my time function:
`time[x_] := Evaluate[Fit[data, {1, x, x^2}, x ]]`
How can I combine the Solve[] function with the time[] function I created to determine what size grid could handle 4.3 * 10 ^17 seconds?m I2018-10-22T01:53:22ZEstimate/predict a discrete value in a dependent variables list?
http://community.wolfram.com/groups/-/m/t/1524074
Dear all,
I have three sets 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:39ZView all calculation steps used by Inverse[] on a matrix?
http://community.wolfram.com/groups/-/m/t/1525459
I want to view all the calculation steps performed by Wolfram to arrive at the resultant matrix for the below:
MatrixForm[
Inverse[{{20, 13, 8}, {0, 14, 18}, {8, 0, 0}},
Modulus -> 29]]
Is there a code that will allow me to see all these calculation steps in either Wolfram Alpha or Mathematica?Curtis Poyton2018-10-21T12:00:06Z[GIF] Double Projection (Projected rotating 16-cell)
http://community.wolfram.com/groups/-/m/t/1525648
![Projected rotating 16-cell][1]
**Double Projection**
This is a similar idea to [_J34_][3]: starting with the vertices of the 16-cell (a.k.a. cross polytope, a.k.a. orthoplex) and thinking of them as points on the 3-sphere, I'm applying a rotation, then projecting down to the 2-sphere using the [Hopf map][4]. From there, the difference from _J34_ is that I'm taking those points on the 2-sphere, forming a spherical disk of radius 0.4, then stereographically projecting down to the plane (this last step uses the `ProjectedSphericalCircle[]` function from [_Small Changes_][5] which, given the center and radius of a disk on the sphere, outputs a `Disk[]` in the plane which is its stereographic image).
First of all, we need the Hopf map and the [smootherstep function][6]:
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};
smootherstep[t_] := 6 t^5 - 15 t^4 + 10 t^3;
And the vertices of the 16-cell:
sixteencellvertices =
Normalize /@
Flatten[Permutations[{-1, 0, 0, 0}]^# & /@ Range[1, 2], 1];
And then this is the animation code:
With[{pts = Normalize /@ sixteencellvertices, viewpoint = 2 {1, 0, 0},
cols = RGBColor /@ {"#00adb5", "#f8b500", "#1a0841"}},
Manipulate[
Graphics[
{Blend[
cols[[;; 2]], (Floor[t] + Sign[1 - t] smootherstep[Mod[t, 1]])],
Table[
ProjectedSphericalCircle[
RotationMatrix[π/2, {0, 0, 1}].
Hopf[
RotationMatrix[π/2 (Floor[t] + smootherstep[Mod[t, 1]]), {{1, 1, 0, 0}, {0, 0, 1, 1}}].pts[[i]]
],
.4],
{i, 1, Length[pts]}]},
PlotRange -> 3, ImageSize -> 540, Background -> cols[[-1]]],
{t, 0, 2}]
]
Finally, here's an image where I've composited together all of the frames of a similar animation (essentially the same thing without the `smootherstep` function, so it's just a constant-speed rotation):
![All frames of the animation composited together][2]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=circles9.gif&userId=610054
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=circle9Still2.png&userId=610054
[3]: http://community.wolfram.com/groups/-/m/t/1521244
[4]: https://en.wikipedia.org/wiki/Hopf_fibration
[5]: http://community.wolfram.com/groups/-/m/t/1282077
[6]: https://en.wikipedia.org/wiki/SmoothstepClayton Shonkwiler2018-10-21T15:00:28ZIllustrate 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:02Z[✓] 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:20ZThe 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:37ZGet 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:25ZFinding 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:08ZGet 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:27ZSolve 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:36ZPseudo-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:11ZMake 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:48ZOuter 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:05Z