Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions from all groups sorted by activeWhich test should I use for comparing slopes between groups?
https://community.wolfram.com/groups/-/m/t/2418533
Hi,
I need some assistance to find the appropriate statistical test for my experimental data.
So, here is a brief introduction: My experimental units are rats. From each experiment I have a set of X and Y values that I analyze by linear regression. The number of experiments varies for each experimental unit (rat). I wish to perform a test to see if there's a difference in the slopes between my experimental groups.
I am using STATA.
I hope my description was clear.Jørgen Myrvang2021-12-04T13:31:25ZHow to realize the automatic replacement for the Laplace transform?
https://community.wolfram.com/groups/-/m/t/2418736
How to realize automatic replacement of `LaplaceTransform[u[x,t],t,s]` with `u1[x,s]`?
In Maple, there is a command *alias* to realize the automatic replacement.
Thanks.Zhonghui Ou2021-12-04T12:09:19Z[WSS21] Lie algebras and curvature in discrete geometry
https://community.wolfram.com/groups/-/m/t/2314740
![Torsion on the Atlas Quiver of the Cube][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Final_ProjectKeyImage.png&userId=2314724
[2]: https://www.wolframcloud.com/obj/5d759157-a630-40fb-a5e5-fd489edc7627
[Original NB]: https://www.wolframcloud.com/obj/88991c7a-ca46-44db-99b9-4dfef6776dd2Antonia Seifert2021-07-14T12:53:28Z[WSG21] Daily Study Group: Differential Equations (begins November 29)
https://community.wolfram.com/groups/-/m/t/2411604
A new study group devoted to Differential Equations begins next Monday! A list of daily topics can be found on our [Daily Study Groups][1] page. This group will be led by one of our outstanding Wolfram certified instructors, Luke Titus, and will meet daily, Monday to Friday, over the next three weeks. Luke will share the excellent lesson videos created by him for the upcoming Wolfram U course "[Introduction to Differential Equations][2]". Study group sessions include time for exercises, discussion and Q&A. This study group will help you achieve the "Course Completion" certificate for the "Introduction to Differential Equations" course after you complete the course quizzes.
Sign up: [Study group registration page][3]
[1]: https://www.wolfram.com/wolfram-u/special-event/study-groups/
[2]: https://www.wolfram.com/wolfram-u/introduction-to-differential-equations/
[3]: https://www.bigmarker.com/series/daily-study-group-intro-to-differential-equations/series_details?utm_bmcr_source=communityDevendra Kapadia2021-11-22T16:35:30ZExtract ROIs from TIF image
https://community.wolfram.com/groups/-/m/t/2417250
Hello all,
I am working a lot with Mathematica and Fiji/ImageJ, and would like to extract data saved in the tif file. In Fiji, there is a possibility to save ROI information as an overlay in an image which can be displayed or saved via the ROI manager.
However, when I open the tif files in Mathematica, I cannot find the ROI data, also not in the other elements besides the image data. Maybe there is a different way to access the information?
What I tried was:
d0 = Import["01.tif", "Elements"]
{"Animation", "Author", "BitDepth", "CameraTopOrientation", \
"Channels", "ColorMap", "ColorProfileData", "ColorSpace", "Comments", \
"CopyrightNotice", "Data", "DateTime", "Device", \
"DeviceManufacturer", "Exif", "FlashUsed", "GeoPosition", \
"GPSDateTime", "Graphics", "GraphicsList", "Image", "Image3D", \
"ImageCount", "ImageCreationDate", "ImageEncoding", "ImageList", \
"ImageResolution", "ImageSize", "IPTC", "MakerNote", "RawData", \
"RawExif", "RawIPTC", "RawXMP", "RedEyeCorrection", "RowsPerStrip", \
"Summary", "SummarySlideView", "Thumbnail", "ThumbnailList", \
"TileSize", "XMP"}
What I import any of these elements individually, they do not contain the overlay information.
Is Mathematica not able to extract the overlay information containing the ROIs?
Thanks!
MaxMaximilian Ulbrich2021-12-01T17:03:43ZImporting TensorFlow neural networks stored as *.h5
https://community.wolfram.com/groups/-/m/t/2418353
Hi All,
I have some pre-trained networks generated by TensorFlow stored as *.h5 files.
I can import the *.h5 files in Mathematica and they seem to contain all the needed information to rebuild the networks.
But before I start working on how to convert the information in those files to Mathematica neural nets I thought I might check if anyone has a solution already.
The only way I found online is to convert the *.h5 files to MXNet files using Microsoft model management of deep neural networks ([link][1])
If anyone has any ideas or tips I would be very grateful!
[1]: https://github.com/microsoft/MMdnnMartijn Froeling2021-12-03T15:51:44ZCryptocurrencies: data acquisition with visualization
https://community.wolfram.com/groups/-/m/t/2293868
*MODERATOR NOTE: Also see [blockchain integration][1] in the Wolfram Language, a part of [Wolfram Blockchain Labs][2].*
[1]: https://reference.wolfram.com/language/guide/Blockchain.html
[2]: https://www.wolframblockchainlabs.com
----------
&[Wolfram Notebook][12]
[Original Notebook]: https://www.wolframcloud.com/obj/8a2ce9a8-eb16-4ec8-8ff7-ff3fd1d60516
[12]: https://www.wolframcloud.com/obj/018a6ebf-c7c2-4912-99fe-dd797dec2030Anton Antonov2021-06-19T15:59:01ZAnchor a button to notebook?
https://community.wolfram.com/groups/-/m/t/2416921
I created a button that opens a package created by me. I would like to pin this button to the top of the notebook. Tried using **DockedCells** with **CreateNotebook** but failed. Can anyone help?
Regards,
Sinvalsinval santos2021-12-01T17:23:43ZHow do I get filled closed B-splines with discrete weights?
https://community.wolfram.com/groups/-/m/t/2417968
Plots of filled bsplines with discrete weights doesn't work...
It returns this error:
"SplineWeights specification {1, 1, 1, 1} should be Automatic, or a list of positive numbers with the same length as control points."
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/5cd29614-882f-4a25-8ee0-a9c93c4ac003Claudio Argento2021-12-03T00:41:51Z[GiF] Multiway EllipticK in meta chess: dancing pawns
https://community.wolfram.com/groups/-/m/t/2417527
![Pawn Dancers][1]
While radioactivity was discovered around turn of century 1900, the technique of dating by [Carbon-14 decay][2] was not formulated until half a century later. Somewhere in between, around 1921, Polya became interested in [lattice walks][3] (and see references therein). Sufficiently simple lattice walks have simple, countable multiway graphs.
For example, Polya's original experiment allows a pawn to move on a regular grid by $\pm(0,1)$ or $\pm(1,0)$ at each time interval, and asks how many even-length paths return to the origin after time $2t$. Amazingly, the answer turns out to have to do with the expansion coefficients of the complete elliptic integral of the first kind (and we can prove this using Creative Telescoping). To just get a sense of what happens, let's calculate the first few terms:
moves = Join[IdentityMatrix[2], -IdentityMatrix[2]];
AXIOM = {{Branch[{0, 0}]}, {Branch[{0, 0}]}};
Iterate[state_] := With[{nextState = Flatten[
Outer[Append[#1, #1[[-1]] + #2] &, state[[1]], moves, 1], 1]},
{Complement[nextState, #], Join[state[[2]], #]} &@
Select[nextState, #[[-1]] == {0, 0} &]]
data = NestList[Iterate, AXIOM, 10];
Differences@Partition[Length /@ data[[All, 2]], 2][[All, 1]]
%/4
Out[]={4, 20, 176, 1876}
Out[]={1, 5, 44, 469}
We can look the sequence up on OEIS, its number is [A054474][4]. This sequence is related to the expansion of EllipticK:
CoefficientList[Series[2/Pi EllipticK[16 x], {x, 0, 4}], x]
{1, 4, 36, 400, 4900}
To see exactly how, let's look at the multiway graph
Graphics3D[{Arrowheads[0.02],
data[[5]] /. Branch[x__] :> Arrow /@ Partition[
MapIndexed[{Sequence @@ #1, -#2[[1]]} &, {x}], 2, 1]
}, ImageSize -> 500, Boxed -> False]
![View1][5]
![View2][6]
Notice that the central axis is terminal for vectors, except at the top of the pyramid. This is by design, since the iterator selects out paths that return to the origin, and ceases building on them. If we want to allow paths to visit the origin multiple times, we already have all the data we need. For example:
SameQ[20 + 4^2, 36]
SameQ[176 + 4^3 + 20*4*2, 400]
Out[]= True,True
If you understand combinatorics terms like $4^2$, $4^3$, and $20*4*2$ have to do with splicing together paths of shorter length. There is a regular way to extend these sorts of calculations to infinity, maybe using something like Bell polynomials, but we aren't too concerned here.
Notice that there is always an extra factor of $4$, which indicates hidden cyclic or dihedral symmetry. We can make symmetry more obvious through animation of the origin-returning walks (using the previous [chess assets][7]). Here we plot four walks:
data[[3, 2, 2 ;; -1]]
Out[]={
Branch[{0, 0}, {-1, 0}, {0, 0}], Branch[{0, 0}, {0, -1}, {0, 0}],
Branch[{0, 0}, {0, 1}, {0, 0}], Branch[{0, 0}, {1, 0}, {0, 0}]}
WorldChessPawnDancers@%
![dance practice][8]
This is not very interesting, but if we step up to the $20$ walks of length $t=4$, we can barely cram them onto a regulation chess board (with four extra pawns at no cost). There is some artistry involved in how to synchronize movements so that pawns can move pairwise and change partners, as we did in the good old days square dancing in Arkansas, ha ha ha. What I came up with yesterday might not be the best choreography, can anyone do better? And does anyone have a six-step choreography for a grand ball of 176 pawns moving in synchrony? How big must we make the game board?
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=DancingPawns.gif&userId=234448
[2]: https://community.wolfram.com/groups/-/m/t/2417062
[3]: https://demonstrations.wolfram.com/FourHypergeometricLatticeWalks/
[4]: https://oeis.org/A054474
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WalkArrowsTop.png&userId=234448
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WalkArrowsSide.png&userId=234448
[7]: https://community.wolfram.com/groups/-/m/t/2413178
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=DancePractice.gif&userId=234448Brad Klee2021-12-02T12:37:05ZThe Wolfram Language & Engine in Visual Studio code notebooks
https://community.wolfram.com/groups/-/m/t/2416983
[![enter image description here][1]][3]
Wolfram Engine is a great tool that makes Wolfram Language available to researchers and developers. But since Wolfram Engine does not ship with a notebook interface, writing and debugging Wolfram Language code is challenging. Motivated by the idea of making Wolfram Engine easier to work with, I have recently developed a VS Code extension **Wolfram Language Notebook**; it offers a lightweight notebook interface to `wolframscript`:
- Download the extension from [VS Code Marketplace][4];
- Checkout [the repository on GitHub][5];
- Also explore similar projects: [WLFJ][6], [lsp-wl][7], and [vscode-wl][8].
To use the extension, you need to install *Wolfram Engine*, or *Wolfram Mathematica* with `wolframscript` (version 12.0 or higher). You are ready to go if you can run `wolframscript` from the command line or the shell. If you want to use remote kernel with the extension, you will instead need an ssh client on the local machine, and `wolframscript` on the remote machine.
---
## Getting Started
To create a new Wolfram Language notebook, execute **Create New Wolfram Language Notebook** in the Command Palette, or create a new file with `.wlnb` extension.
Execute **Manage Kernels** command and choose **Use wolframscript** to add `wolframscript` to the kernel configuration and connect to it. The status of the kernel will be shown in the status bar.
Add a code cell, type Wolfram language code in the cell, and evaluate it.
![getting-started-gif][9]
## Features
**Syntax Highlighting**: The notebook highlights Wolfram language syntax, common built-in functions, and full character names, e.g. `\[Alpha]`.
**Auto-completion and Usages**: Auto-completion for built-in functions are provided. Their usage information is displayed when typing and hovering.
**Output Renderer**: The notebook renders common Wolfram language expressions into HTML for better presentations. Graphics are shown as rasterized images.
**Export as Wolfram notebook**: The notebooks can be exported as Wolfram notebooks, containing markdown cells, code cells and their outputs.
**Remote kernel**: When configured, the notebook can establish an ssh connection to the remote machine and launch a kernel on it. Computations are done remotely, but code and outputs are stored locally. See [the kernel configuration guide][10].
## How it works & limitations
![how-it-works][11]
The interface of Wolfram Language Notebook is based on [VS Code Notebook API][12]. The extension launches `wolframscript` and connect to the kernel, and it will manage sending and receiving messages from the kernel. On the back-end, a wolfram kernel schedules the computations, which are done by a subkernel.
Currently, the extension has a few notable limitations. First, the notebook interface cannot send interaction made by the user back to the kernel, because the VS Code API for such messaging is yet to be finalized. Interactive interface is expected to be implemented in future versions. Second, the presentation of graphics still needs to be improved. Instead of bitmaps, vector graphics is a better form in terms of performance and interactability, but such migration will take a long period of time.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3841ScreenShot2021-12-02at8.25.26AM.jpg&userId=11733
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ScreenShot2021-12-02at8.25.26AM.jpg&userId=11733
[3]: https://marketplace.visualstudio.com/items?itemName=njpipeorgan.wolfram-language-notebook
[4]: https://marketplace.visualstudio.com/items?itemName=njpipeorgan.wolfram-language-notebook
[5]: https://github.com/njpipeorgan/wolfram-language-notebook
[6]: https://github.com/WolframResearch/WolframLanguageForJupyter
[7]: https://github.com/kenkangxgwe/lsp-wl
[8]: https://github.com/Shigma/vscode-wl
[9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=getting-started.gif&userId=1470526
[10]: https://github.com/njpipeorgan/wolfram-language-notebook/blob/main/README.md#kernel-configuration
[11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=architecture.PNG&userId=1470526
[12]: https://code.visualstudio.com/api/extension-guides/notebookBrian Lu2021-12-01T22:58:42ZNDSolve error: step size is effectively zero
https://community.wolfram.com/groups/-/m/t/2413688
I am trying to solve a nonlinear differential equation using NDSolve
numericaldiffeqqa =
NDSolve[{(q^\[Prime]\[Prime])[\[Phi]] + q[\[Phi]] == -(
1/(1 + q[\[Phi]])^2), q[0] == 1, q'[0] == 1},
q, {\[Phi], 0, 50}];
Plot[Evaluate[q[\[Phi]] /. numericaldiffeqqa], {\[Phi], 0, 50},
PlotRange -> All]
ParametricPlot[
Evaluate[{q[\[Phi]], q'[\[Phi]]} /. numericaldiffeqqa], {\[Phi], 0,
50}]
gives the result of
NDSolve::ndsz: At \[Phi] == 2.5326866484431907`, step size is effectively zero; singularity or stiff system suspected.
What do I do to fix this?Lance Randall Gamier2021-11-26T12:16:39ZRotorWith3DEffects modeling problems inconsistent with Mathematica
https://community.wolfram.com/groups/-/m/t/2417648
This is a question directly related to several other previous questions of mine, however most directly related to [Torn Equations][1]
Besides that question, I have also (through Mathematica) modeled, simulated and controlled a [flywheel inverted pendulum][2] (youtube link)
This works well, and I have a good mathematical understanding of the model equations, which is why it, and the other previous testbench (as seen in my Torn equations question) are my direct comparisons to models I've made SystemModeler.
When improving my models using `RotorWith3DEffects` I realized that this particular class isn't quite used as exactly as the other `Rotor` and also isn't quite connected the same in order to achieve the 1DOF inertia on a 3D body. When reading the documentation there is a single line
> Gyroscopic torques appear, if the vector of the carrier body's angular velocity is not parallel to the vector of the rotor's axis.
Which for my English is a bit cryptic, but fine. When looking at suggested other examples, such as `
GyroscopicEffects`
![gryo][3]
It shows that the class is connected via the Housing connector. So I do this as well in my models, which produce great results that match the real model and the Mathematica version.
My issue now comes that when trying to improve my BLDC motor model, which is a maxon EC45 Flat, an "aussen roller" Or namely a motor with rotating housing, clearly also has a rotating inertia that I want to include to complete my model.
![motor][4]
Because I want to use this in a library/package later for reuse, I want to the motor model to be complete, and not simply add it's inertia to an outside class.
The problem here arises, when I want to connect the motor model shaft of the inner `RotorWith3DEffects` to an 'shaft' or outer `RotorWith3DEffects` the gyroscopic effects disappear.
But this is fine, clearly I have a misunderstanding. So I tried to experiment with 5 different modeling/connection techniques to figure out how to connect this model correctly.
Unfortunately, I now have 5 different results, none of which are similar, and only one that sort of resembles the model from Mathematica, except it appears to have energy being constantly added to the system, instead of it dissipating.
The Mathematica ODEs are :
Where $\alpha(t)$ is the pendulum angle, and $\phi(t)$ is the motor angle. with various inertias, friction and masses.
$$\left\{g \sin (\alpha (t)) (k \text{mw}+l \text{mb})+\text{jw} \phi ''(t)+\Theta \alpha ''(t)=-\text{rb} \alpha '(t)-\mu \tanh \left(\frac{\alpha '(t)}{\iota }\right),\text{jw} \left(\alpha ''(t)+\phi ''(t)\right)=\tau u(t)-\text{rw} \phi '(t)\right\}$$
When given a simple constant input of 0.6 at $u(t)$ from hanging position of initial angle $\alpha(0) = 0$ the Motor spins up, causes swinging and short lived constant offset before the system falls back to angle zero as seen here:
![rotor][5]
Also
![plot][6]
When using the actual physical model, this also happens, pretty much exactly the same, as such I am confident this is modeled fairly well.
As mentioned unfortunately, when doing this same within my 5 different experiments, I don't get any of the same results but instead either no displacement whatsoever, a constant non-dissipating oscillation or a constant angle accumulation that eventually breaks the simulation, as seen here:
![models][7]
![models][8]
![more plots][9]
TLDR: I want to be able to use `RotorWith3DEffects` like `Rotor` to get gyroscopic effects with my internal motor model, and be able to use the rotors shafts as connection points, rather the housing, however it seems this isn't possible in the way I expect it, and when comparing different connect methods, against Mathematica, I get wildly different results, and I don't know which one is correct, and baring all of them are wrong, then I'm completely stuck.
How do I use this class correctly, the description and one single example within the documentation don't specify this enough for me, and the many test results don't match up with my real world model or Mathematicas.
I have included the Mathematica files and System modeler file within this post for your own testing, done in System modeler 12.3. Thanks for the help.
[1]: https://community.wolfram.com/groups/-/m/t/2403814?p_p_auth=J60QE3xh
[2]: https://www.youtube.com/watch?v=Lzw3ZGTuMUU
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-12-02at10.28.38.png&userId=1222283
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-12-02at10.32.57.png&userId=1222283
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=rotar.gif&userId=1222283
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=plot.png&userId=1222283
[7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-12-02at10.51.19.png&userId=1222283
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-12-02at11.07.17.png&userId=1222283
[9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-12-02at10.51.46.png&userId=1222283Mor Bo2021-12-02T10:03:21ZUnderstanding Graphics3D's view options: the intuitive way
https://community.wolfram.com/groups/-/m/t/2417276
![Graphics3D with anchored rotation axis][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ViewPoint.gif&userId=93201
[2]: https://www.wolframcloud.com/obj/586d1953-bb18-4697-aa0a-6fe757a33fa3
[Original NB]: https://www.wolframcloud.com/obj/a3f6b88f-6f46-4015-b64d-9b824b36ee10Silvia Hao2021-12-01T19:32:46ZMathematica benchmarks for new M1 MacBooks?
https://community.wolfram.com/groups/-/m/t/2118125
Are there any benchmarks yet for Mathematica 12.1 on the new (13") M1 MacBook Air or (13") M1 MacBook Pro?Murray Eisenberg2020-11-18T20:19:23ZSearching toolbar for notebooks?
https://community.wolfram.com/groups/-/m/t/2415401
Currently to search within a notebook a floating search window is provided (very much 1990s UI approach). However one has to keep adjusting which notebook the searching is focused on. Having an option for a searching toolbar would really help and allows for each notebook to have its own. With my poor vision I can get confused which window its searching in. I dont have yet the skills to create this toolbar.
I would like to think this is a no brainer tool to create, make it so, please. Thank you!Andrew Meit2021-11-29T17:44:02ZAutomatically expand function tips when typeset in Mathematica?
https://community.wolfram.com/groups/-/m/t/2417373
![enter image description here][1]
When typeset a function, there will be a small tip window. Is there any way to automatically expand it without clicking the button?
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mmatip.png&userId=2417340Kila Sue2021-12-02T09:09:18ZIntercept magnification evaluation for enlarging a palette?
https://community.wolfram.com/groups/-/m/t/2414857
I understand if I use Automatic/Fit for settings in ImageSize, WindowSize, etc..., then when one selects a magnification setting the created window/palette will enlarge correctly. This is great for us who are visually impaired. However, when I use numerical values for ImageSize, WindowSize etc...(for elegant design of layout) then the zoom enlargement gets screwed up. I am seeking a method to do the scaling programmatically so I can do the scaling correctly ie some kind of factor to be applied when the user selects a zoom setting and not let the FrontEnd do it for me. This solution would help many UI designers using Mathematica with full visual control. Consider this programming challenge for greater accessibility. Sorry I have no clue where to start so have no code to offer. The trick is manually handling the enlargement not the FrontEnd for complete control. Thanks for helping us visually impaired folks. :-)Andrew Meit2021-11-29T07:41:27ZBest general relativity / Mathematica code book?
https://community.wolfram.com/groups/-/m/t/478964
Hi,
An intimate understanding of GR/SR is on my "bucket list" and I'm trying to find the best relativity book that has accompanying code to walk through hand-on examples of the physics/mathematics. I've looked around pretty extensively and I've found a few contenders:
1. [Mathematica for Theoretical Physics: Electrodynamics, Quantum Mechanics, General Relativity, and Fractals][1]. This seems pretty old and I'm worried that if I get the latest Mathematica home edition it won't be compatible with the code from back in 2005.
2. [Gravity: An Introduction to Einstein's General Relativity][2]. This book has a website with a few mathematica [codes][3] but it's not a full blown code book
3. [General Relativity and Cosmology using Mathematica][4] This looks very promising but isn't completed yet.
Any thoughts on the best code resource for walking through SR/GR or votes for books [1] and [2]?
[1]: http://www.amazon.com/Mathematica-Theoretical-Physics-Electrodynamics-Relativity/dp/1493900560/ref=sr_1_fkmr0_1?ie=UTF8&qid=1429019287&sr=8-1-fkmr0&keywords=Mathematica%20for%20Theoretical%20Physics:%20Electrodynamics,%20Quantum%20Mechanics,%20General%20Relativity,%20and%20Fractals,%20Second%20Edition
[2]: http://www.amazon.com/Gravity-Introduction-Einsteins-General-Relativity/dp/0805386629/ref=sr_1_1?ie=UTF8&qid=1429020582&sr=8-1&keywords=An%20Introduction%20to%20Einstein%27s%20General%20Relativity%20hartle
[3]: http://web.physics.ucsb.edu/~gravitybook/mathematica.html
[4]: http://darkwing.uoregon.edu/~phys600/GRmath.htmlJohn Mercer2015-04-14T14:15:57ZA simple multiway example: radioactive decay
https://community.wolfram.com/groups/-/m/t/2417062
In a recent [Blog Post][1] Stephen Wolfram showed that a lot of interesting geometry can be created just by iterating a simple function. The spirals are neat, some even seem to be [works of art][2]. It isn't immediately clear what a graph object has to do with science, so undergrads are left wanting more explanation. What is the simplest case where multi-computational paradigm can be applied to a textbook physics problem? One obvious candidate is Radioactive decay of Carbon atoms.
Say we have an array of $^{14}C$ atoms, and count $N$ of them at time $t=0$. After about $5,700$ years, we can expect to find about $N/2$ have decayed to nitrogen. Assuming atoms decay sequentially, how many possible paths through configuration space can we take? The simple answer is to choose $N/2$ from $N$ and take all possible permutations via the factorial function,
(*N = 2, 4, 6 . . . *)
In[]:= Binomial[2 #, #] (#!) & /@ Range[6]
Out[]= {2, 12, 120, 1680, 30240, 665280}
And of course, this sequence is [known on OEIS][3]. To introduce a graphical method, we will instead sum over paths on a multiway graph. Represent a valid state as a list of $1$'s or $0$'s, with $1$ standing for Carbon, and $0$ standing for nitrogen. The iterator through configuration space decays exactly one Carbon atom in all possible ways.
Iterate[state_] := With[{locs = Position[state, 1][[All, 1]]},
ReplacePart[state, # -> 0] & /@ locs]
Decay[nInt_] := NestList[Union[Flatten[Iterate /@ #, 1]] &,
{Table[1, {nInt}]}, nInt]
Examining the output of any given call to **Decay[n]**, we notice that counting states in a particular generation follows a row of Pascal's triangle
PascalsTriangle[nInt_] := Table[Length /@ Decay[i], {i, 0, nInt}]
PascalsTriangle[10] // TableForm
![pascal triangle][4]
This is a useful fact when plotting
IntEdgeMap[nInt_] :=
MapIndexed[#1 -> #2[[1]] &,
SortBy[Tuples[{1, 0}, nInt], -Total[#] &]];
DecayEdges[nInt_] := ReplaceAll[Flatten[Outer[If[
HammingDistance[#1, #2] == 1, DirectedEdge[#1, #2], {}] &,
#[[1]], #[[2]], 1] & /@ Partition[Decay[nInt], 2, 1]],
IntEdgeMap[nInt]]
vertexSort[nInt_] := With[{offset = Divide[Max[#] - #, 2]
&@PascalsTriangle[nInt][[-1]]},
{#[[1]] +
offset[[#[[2]]]], (1 - #[[2]])/nInt Binomial[nInt,
Floor[nInt/2]]} & /@
Map[Reverse[Position[Decay[nInt], #][[1]]] &,
SortBy[Tuples[{1, 0}, nInt], -Total[#] &]]]
DecayGraph[nInt_] :=
With[{HLs = nInt - NestWhileList[#/2 &, nInt, # > 1 &]},
Show[Graphics[Line[{{0, - # Binomial[nInt, Floor[nInt/2]]/nInt },
{Binomial[nInt, Floor[nInt/2]] + 1,
- # Binomial[nInt, Floor[nInt/2]]/nInt }}] & /@ HLs],
Graph[DecayEdges[nInt], VertexCoordinates -> vertexSort[nInt]]]]
GraphicsGrid[Map[Show[#, ImageSize -> 200] &,
Partition[DecayGraph /@ Range[1, 8], 4], {2}]]
![decay multiway graphs][5]
Now let's examine features of these graphs, particularly even cases. Horizontal lines mark successive half-lives, and the first half life (for even cases) always intersects a row of $\binom{2n}{n}$ nodes with excatly $n$ edges directed into each node. If we follow the branching structure back to the root, we see that, on each preceding level, nodes have one less input. Thus we can derive the formula, that number of unique paths to one half life, $a(n) = \binom{2n}{n}n!=\frac{(2n)!}{n!}$.
Another interesting question is about the profile of state space:
PascalDist[nInt_] := MapIndexed[ {#2[[1]]/(nInt + 2), #1} &,
PascalsTriangle[nInt][[-1]]/Binomial[nInt, Floor[nInt/2]]]
ListLinePlot[PascalDist[2 #] & /@ Range[6],
PlotRange -> {{0, 1}, Automatic}, ImageSize -> 500]
![limit][6]
Does this limit tend to a definite shape? If yes what?
[1]: https://www.wolframphysics.org/bulletins/2021/10/multicomputation-with-numbers-the-case-of-simple-multiway-systems/
[2]: https://content.wolfram.com/uploads/sites/32/2021/10/1011sw1005img290.png
[3]: https://oeis.org/A001813
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=pascaltriangle.png&userId=234448
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=decay.png&userId=234448
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Profile.png&userId=234448Brad Klee2021-12-01T16:05:49ZHow to access past study groups?
https://community.wolfram.com/groups/-/m/t/2416301
I discovered Wolfram U Study Groups at Series 19: Introduction to Differential Equations. I am attending webinars and I truly like them. However, now I wonder if I have missed all previous series to this one. Is there a way to gain access to Group Studies Series 1 to 18?Ishant Yadav2021-11-30T18:24:07ZSystemModeler compiler can't find inttypes.h?
https://community.wolfram.com/groups/-/m/t/2415213
I tried to compile a co-simulation FMU (2.0) and the compiler complains that **inttypes.h**
is missing. The same error ocurred when I try to run any model. Here is the compiler settings:
![enter image description here][1]
And here is the compiler error:
![enter image description here][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=SM_compiler.PNG&userId=2190488
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=SM_compiler_error.png&userId=2190488
There is a macro in **modelica_types.h**: `HAVE_INTTYPES_H` and seems to me
that it is defined somewhere else, so the compiler tries to compile with this header but doesn't find it. I inspected the folder of **modelica_types.h** but didn't see any **inttypes.h**.
System:
Product version: 12.3.1.7 <br />
Client: Model Center <br />
Client version: 12.3.1.6 <br />
Client creation date: 2021-06-07T11:45:13.640000 <br />
Client build revisions: S:1b0160c02, J:1dbf5d051, L:38c242434 <br />
Client build type: 64 bit <br />
Kernel version: 12.3.1.7 <br />
Kernel creation date: 2021-05-27T14:59:37.824000 <br />
Kernel build revisions: S:745840ba9, J:84e3d9a4b, L:38c242434 <br />
Kernel root directory: C:\Program Files\Wolfram Research\SystemModeler 12.3.1 <br />
Installation directory: C:\Program Files\Wolfram Research\SystemModeler 12.3.1 <br />
Platform: Windows 10 Version 1909Michel Oliveira2021-11-29T19:53:35ZIteratively producing plots by changing parameter?
https://community.wolfram.com/groups/-/m/t/2415710
I want to change the parameter of Γ, output each graph, and then display all the graphs on top of each other.
What should i do?
Ug = 1/2; U = -1/12; u = 1/4; s = -13; w = 10; p = -5;Γ= 0.001;
E := 2*s + p + Ug + w;
Em1[y_] := s + p + U + y;
Em2[y_] := s + p + u + y;
Ef[x_, y_] := 2*s + x + y;
I1[y_] := {1/{(Em1[y] - E)^2 + (Pi*Γ)^2}};
I2[y_] := {1/{(Em2[y] - E)^2 + (Pi*Γ)^2}};
S[y_] := (I1[y]/(I1[y] + 2*I2[y]))*Log[2, (I1[y] + 2*I2[y])/I1[y]] +
2*I2[y]/(I1[y] + 2*I2[y])*Log[2, (I1[y] + 2*I2[y])/(2*I2[y])];
Plot[S[y], {y, -10, 5}, PlotRange -> All, AxesLabel -> Automatic,
PlotPoints -> 10000,
GridLines -> {{-2.75, -2.55, -2.41, -1.61}, {0}},
GridLinesStyle -> Red]Ryo Tanaka2021-11-30T09:18:22ZSolving for value inside matrix
https://community.wolfram.com/groups/-/m/t/2416459
I am attempting to solve the following problem:
Assuming an adult survival rate of 60% and a reproductive rate of 2/3 female chick per year, is there a juvenile survival rate at which the population stabilizes (with positive population)?
Hint: A stable population corresponds to lambda=1 being the dominant eigenvalue.
I have already set up the matrix below.
![enter image description here][1]
I think I have set the value of lambda=1 appropriately, however I am new to Mathematica and unsure. I need to utilize a Solve function to solve for the variable 'a'. However, I can't seem to find any examples of this particular type of problem.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Mathematicaq1.PNG&userId=2409505Kaylea Anderson2021-12-01T00:25:16ZHow to eliminate the border in a rasterized image?
https://community.wolfram.com/groups/-/m/t/2416369
I am trying to create a mask for image processing. Below is a typical code for the mask. I added the pink background to highlight the problem. I would like this to be a 450x450 image, without the pink border. How should I do it?
Rasterize[
Graphics[{Yellow, Rectangle[{1, 1}, {450, 450}], Black,
Polygon[{{1, 163}, {243, 450}, {450, 219}, {450, 450}, {1,
450}}]}], "Image", RasterSize -> 450, Background -> Pink]
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=pink.jpg&userId=2355526Claudio Argento2021-11-30T23:59:30ZIs there a function, that simplifies logical statements?
https://community.wolfram.com/groups/-/m/t/2416192
Why does Wolfram|Alpha not return True for following inputs:
trueQ[!(Exists[x,Exists[y,A[x,y]]] && !Exists[x,Exists[y,A[y,x]]])]
Simplify[!(Exists[x,Exists[y,A[x,y]]] && !Exists[x,Exists[y,A[y,x]]])]
?
The statement is obviously true, since first half before "and" claims that 2 things that satisfy A exist and second half after "and" claims that 2 such things do not exist(order of 2 existence quantifiers is not important), then this contradicting claim is negated.
Is it a bug in Wolfram|Alpha, that it does not return true?
Is trueQ or Simplify (or some other Wolfram function) supposed to (always) return true, if the argument is true (with every argument)?
Would it even be possible to make an algorithm that understands if it's argument is true or not for every argument(with regard to Gödel 2. incompleteness theorem)?
Which Wolfram's built-in function is best to determine if such logical statement with quantifiers are consistent or inconsistent?Olger Männik2021-11-30T20:39:54ZTry to beat these MRB constant records!
https://community.wolfram.com/groups/-/m/t/366628
The MRB constant: ALL ABOARD!
-----------------------------
POSTED BY: Marvin Ray Burns.
![CMRB][1]
Map:
----
- First, we have formal identities and theory for **C**<sub>*MRB*</sub>.
- Next, we have 3 primary proofs for all the listed **C**<sub>*MRB*</sub> formal identities.
- Then, at the end of this initial posting, we have world records of the maximum number of digits of **C**<sub>*MRB*</sub>
computations by date.
- Then we have some hints for anyone serious about breaking my record.
- Followed by speed records,
- a program Richard Crandall wrote to check his code for the computing record number of digits
- and a conversation about whether Mathematica uses the same algorithm for computing **C**<sub>*MRB*</sub> by a couple of different methods.
- Then, for a few replies, we compute **C**<sub>*MRB*</sub> from Crandall's eta derivative formulas and see records there.
- There are three replies about "NEW RECORD ATTEMPTS OF 4,000,000 DIGITS!" and the computation is now complete!!!!!.
- We see where I am on a 5,000,000 digit calculation. **(Just recently completed!!!!!!!!!!!!)**
- I describe the MRB supercomputer!!!!!! (faster than some computers with dual platinum Xeon processors) It was used for the 5,000,000 digit calculation.
- Then it comes time for the 6 million digit computation of **C**<sub>*MRB*</sub>. (put on hold, but taken up again at the end)
- We compute **C**<sub>*MRB*</sub> sum via an integral, which certifies the accuracy of **C**<sub>*MRB*</sub> calculations!!!!! (since the sum and integral are vastly different in every way they are computed)
- Then we take up the task of calculating 6,000,000 (6 million) digits of **C**<sub>*MRB*</sub> (for the <s>fourth, fifth time, sixth, seventh time!) (will finish Thu 25 Feb 2021 06:48:06).</s>
- We look for closed forms and find nontrivial, arbitrarily close approximations of **C**<sub>*MRB*</sub>.
- The latest updates on the MRB constant supercomputer 2 (with a GIF of it) and how I'm using it to break new records -- up to 6,500,000 digits which failed when 70.7% complete -- are in a few replies.
- **On my 8th try I finally report that I successfully computed 6,000,000 digits of **C**<sub>*MRB*** !
- We work at proving the accuracy of my computations.
- For a few replies, we find a few more formulas for **C**<sub>*MRB*,</sub>.
- We take up the challenge of computing 6,500,000 digits for the second time.
----------
**C**<sub>*MRB*</sub> is defined at [http://mathworld.wolfram.com/MRBConstant.html][2].
> ![MathWorld MRB][3] ![Mathworld MRB 2][4]
>
> SEE ALSO:
> Glaisher-Kinkelin Constant, Power Tower, Steiner's Problem
> REFERENCES:
> Burns, M. R. "An Alternating Series Involving n^(th) Roots." Unpublished note, 1999.
>
> Burns, M. R. "Try to Beat These MRB Constant Records!" http://community.wolfram.com/groups/-/m/t/366628.
>
> Crandall, R. E. "Unified Algorithms for Polylogarithm, L-Series, and Zeta Variants." 2012a.
> http://www.marvinrayburns.com/UniversalTOC25.pdf.
>
> Crandall, R. E. "The MRB Constant." §7.5 in Algorithmic Reflections: Selected Works. PSI Press, pp. 28-29, 2012b.
>
> Finch, S. R. Mathematical Constants. Cambridge, England: Cambridge University Press, p. 450, 2003.
>
> Plouffe, S. "MRB Constant." http://pi.lacim.uqam.ca/piDATA/mrburns.txt.
>
> Sloane, N. J. A. Sequences A037077 in "The On-Line Encyclopedia of Integer Sequences."
>
> Referenced on Wolfram|Alpha: MRB Constant
> CITE THIS AS:
> Weisstein, Eric W. "MRB Constant." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/MRBConstant.html
I developed this informal catalog of formulas for the MRB constant with over 20 years of research and ideas from users like you.
11/14/2021
Here is a standard notation for the above mentioned
**C**<sub>*MRB*,</sub>![enter image description here][5]
![enter image description here][6].
CMRB = 0.18785964246206712024851793405427323005590332204; Table[
NSum[ (Sum[E^(I \[Pi] x) Log[x]^n/(n! x^n), {x, 1, Infinity}]), {n,
1, a}, WorkingPrecision -> 50] - CMRB, {a, 1, 10}]
11/01/2021: The catalog now appears complete:
> ![enter image description here][7] ![enter image description here][8]
>
> g[x_] = x^(1/x); CMRB =
> NSum[(-1)^k (g[k] - 1), {k, 1, Infinity}, WorkingPrecision -> 100,
> Method -> "AlternatingSigns"]; a = -Infinity I; b = Infinity I;
> g[x_] = x^(1/x); (v = t/(1 + t + t I);
> Print[CMRB - (-I /2 NIntegrate[ Re[v^-v Csc[Pi/v]]/ (t^2), {t, a, b},
> WorkingPrecision -> 100])]); Clear[a, b]
> -9.3472*10^-94
>
> Thus, we find
>
> ![enter image description here][9]
>
> [here.][10]
>
> Lest we forget, ![enter image description here][11] as seen in a late
> reply below and [here.][12]
(proofs and more example code follows)
On 10/18/2021, I found the following triad of pairs of integrals summed from -complex infinity to +complex infinity.
![CMRB= -complex infinity to +complex infinit][13]
You can see it worked [here][14].
In[1]:= n = {1, 25.6566540351058628559907};
In[2]:= g[x_] = x^(n/x);
-1/2 Im[N[
NIntegrate[(g[(1 - t)])/(Sin[\[Pi] t]), {t, -Infinity I,
Infinity I}, WorkingPrecision -> 60], 20]]
Out[3]= {0.18785964246206712025, 0.18785964246206712025}
In[4]:= g[x_] = x^(n/x);
1/2 Im[N[NIntegrate[(g[(1 + t)])/(Sin[\[Pi] t]), {t, -Infinity I,
Infinity I}, WorkingPrecision -> 60], 20]]
Out[5]= {0.18785964246206712025, 0.18785964246206712025}
In[6]:= g[x_] = x^(n/x);
1/4 Im[N[NIntegrate[(g[(1 + t)] - (g[(1 - t)]))/(Sin[\[Pi] t]), {t, -Infinity I,
Infinity I}, WorkingPrecision -> 60], 20]]
Out[7]= {0.18785964246206712025, 0.18785964246206712025}
So, we have
![CMRB n and 1][15]
as shown next.
n = 25.656654035105862855990729336074451537947705460580720486261181949\
0097321718621288009944007124739159792146480733342667`100.;
g[x_] = {x^(1/x), x^(n/x)};
CMRB = NSum[(-1)^k (k^(1/k) - 1), {k, 1, Infinity},
WorkingPrecision -> 100, Method -> "AlternatingSigns"];
Print[CMRB -
NIntegrate[Im[g[(1 + I t)]/Sinh[\[Pi] t]], {t, 0, Infinity},
WorkingPrecision -> 100],
u = (-1 + t); v = t/u;
CMRB - NIntegrate[Im[g[(1 + I v)]/(Sinh[\[Pi] v] u^2)], {t, 0, 1},
WorkingPrecision -> 100],
CMRB - NIntegrate[Im[g[(1 - I v)]/(Sinh[-\[Pi] v] u^2)], {t, 0, 1},
WorkingPrecision -> 100]]
{-9.3472*10^-94,-9.3472*10^-94}{-9.3472*10^-94,-9.3472*10^-94}{-9.3472*10^-94,-9.3472*10^-94}
----------
On 10/10/2021, I found the following proper definite integral for CMRB.
![enter image description here][16]
See [a to infinity to 0 to 1 CMRB][17].
As I mentioned in another message, this leads to almost identical proper integrals for CMRB and its integrated analog.
![m vs m2 0 to 1][18]
See [notebook here][19].
----------
----------
On 9/29/2021 I found the following equation for **C**<sub>*MRB*</sub> (great for integer arithmetic because
(1-1/n)^k=(n-1)^k/n^k. )
![CMRB integers 1][20]
So, using only integers, and sufficiently large ones in place of infinity, we can use
![CMRB integers 2][21]
See
In[1]:= Timing[m=NSum[(-1)^n (n^(1/n)-1),{n,1,Infinity},WorkingPrecision->200,Method->"AlternatingSigns"]][[1]]
Out[1]= 0.086374
In[2]:= Timing[m-NSum[(-1)^n/x! (Sum[((-1 + n)^k) /(k n^(1 + k)), {k, 1, Infinity}])^ x, {n, 2, Infinity}, {x, 1,100}, Method -> "AlternatingSigns", WorkingPrecision -> 200, NSumTerms -> 100]]
Out[2]= {17.8915,-2.2*^-197}
It is very much slower, but it can give a rational approximation (p/q), like in the following.
In[3]:= mt=Sum[(-1)^n/x! (Sum[((-1 + n)^k) /(k n^(1 + k)), {k, 1,500}])^ x, {n, 2,500}, {x, 6}];
In[4]:= N[m-mt]
Out[4]= -0.00602661
In[5]:= Head[mt]
Out[5]= Rational
Compared to the NSum formula for m, we see
In[6]:= Head[m]
Out[6]= Real
----------
On 9/19/2021 I found the following quality of **C**<sub>*MRB*</sub>.
![replace constants for CMRB][22]
On 9/5/2021 I added the following MRB constant integral over an unusual range.
![strange][23]
See proof [here][24].
----------
On Pi Day, 2021, 2:40 pm EST,
I added a new MRB constant integral.
![CMRB][25] ![=][26] ![integral to sum][27]
We see many more integrals for **C**<sub>*MRB*</sub>.
We can expand
![1/x][28]
into the following.
![xx = 25.656654035][29]
xx = 25.65665403510586285599072933607445153794770546058072048626118194\
90097321718621288009944007124739159792146480733342667`100.;
g[x_] = x^(xx/
x); I NIntegrate[(g[(-t I + 1)] - g[(t I + 1)])/(Exp[Pi t] -
Exp[-Pi t]), {t, 0, Infinity}, WorkingPrecision -> 100]
(*
0.18785964246206712024851793405427323005590309490013878617200468408947\
72315646602137032966544331074969.*)
**Expanding upon the previously mentioned**
![enMRB sinh][30]
we get the following set of formulas that all equal **C**<sub>*MRB*</sub>:
Let
x= 25.656654035105862855990729 ...
along with the following constants (approximate values given)
{u = -3.20528124009334715662802858},
{u = -1.975955817063408761652299},
{u = -1.028853359952178482391753},
{u = 0.0233205964164237996087020},
{u = 1.0288510656792879404912390},
{u = 1.9759300365560440110320579},
{u = 3.3776887945654916860102506},
{u = 4.2186640662797203304551583} or
$
u = \infty .$
Another set follows.
let
x = 1 and
along with the following {approximations}
{u = 2.451894470180356539050514},
{u = 1.333754341654332447320456} or
$
u = \infty $
then
![enter image description here][31]
See
[this notebook from the wolfram cloud][32]
for justification.
----------
----------
Also, in terms of the Euler-Riemann zeta function,
**C**<sub>*MRB*</sub> =![enter image description here][33]
Furthermore, as ![enter image description here][34],
according to [user90369][35] at StackExchange, **C**<sub>*MRB*</sub> can be written as the sum of zeta derivatives similar to the eta derivatives discovered by Crandall.
![zeta hint ][36]Informations about ?<sup>(j)</sup>(k) please see e.g. [here][37], formulas (11)+(16)+(19).![credit][38]
In the light of the parts above, where
**C**<sub>*MRB*</sub>
= ![k^(1/k)-1][39]
= ![eta'(k)][40]
= ![sum from 0][41] ![enter image description here][42]
as well as ![double equals RHS][43]
an internet scholar going by the moniker "Dark Malthorp" wrote:
> ![eta *z^k][44]
----------
Primary Proof 1
------------------
**C**<sub>*MRB*</sub>=![enter image description here][45], based on
**C**<sub>*MRB*</sub>
![eta equals][46]
![enter image description here][47]
is proven below by an internet scholar going by the moniker "Dark Malthorp."
![Dark Marthorp's proof][48]
----------
----------
----------
Primary Proof 2
------------------
![eta sums][49] denoting the kth derivative of the Dirichlet eta function of k and 0 respectively,
was first discovered in 2012 by Richard Crandall of Apple Computer.
The left half is proven below by Gottfried Helms and it is proven more rigorously![(][50]considering the conditionally convergent sum,![enter image description here][51]![)][52] below that. Then the right half is a Taylor expansion of ?(s) around s = 0.
> ![n^(1/n)-1][53]
At
[https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal][54],
it has been noted that "even though one has cause to be a little bit wary around formal rearrangements of conditionally convergent sums (see the [Riemann series theorem][55]), it's not very difficult to validate the formal manipulation of Helms. The idea is to cordon off a big chunk of the infinite double summation (all the terms from the second column on) that we know is absolutely convergent, which we are then free to rearrange with impunity. (Most relevantly for our purposes here, see pages 80-85 of this [document][56], culminating with the Fubini theorem which is essentially the manipulation Helms is using.)"
> ![argrument 1][57] ![argrument 2][58]
----------
----------
----------
----------
Primary Proof 3
------------------
Here is proof of a faster converging integral for its integrated analog (The MKB constant) by Ariel Gershon.
g(x)=x^(1/x), M1=![hypothesis][59]
Which is the same as
![enter image description here][60]
because changing the upper limit to 2N + 1 increases MI by 2i/?.
MKB constant calculations have been moved to their own discussion at [http://community.wolfram.com/groups/-/m/t/1323951?p_p_auth=W3TxvEwH][61] .
![Iimofg->1][62]
![Cauchy's Integral Theorem][63]
![Lim surface h gamma r=0][64]
![Lim surface h beta r=0][65]
![limit to 2n-1][66]
![limit to 2n-][67]
Plugging in equations [5] and [6] into equation [2] gives us:
![left][68]![right][69]
Now take the limit as N?? and apply equations [3] and [4] :
![QED][70]
He went on to note that
![enter image description here][71]
I wondered about the relationship between CMRB and its integrated analog and asked the following.
![enter image description here][72]
So far I came up with
&[Wolfram Notebook][73]
Another relationship between the sum and integral that remains more unproven than I would like is
![CMRB(1-i)][74]
f[x_] = E^(I \[Pi] x) (1 - (1 + x)^(1/(1 + x)));
CMRB = NSum[f[n], {n, 0, Infinity}, WorkingPrecision -> 30,
Method -> "AlternatingSigns"];
M2 = NIntegrate[f[t], {t, 0, Infinity I}, WorkingPrecision -> 50];
part = NIntegrate[(Im[2 f[(-t)]] + (f[(-t)] - f[(t)]))/(-1 +
E^(-2 I \[Pi] t)), {t, 0, Infinity I}, WorkingPrecision -> 50];
CMRB (1 - I) - (M2 - part)
gives
> 6.103779*10^-23 - 6.103779*10^-23 I.
----------
----------
As with any scientific paper, this post contains only reproducible results with methods. These records represent the advancement of consumer-level computers and clever programming over the past 20 years. I see others breaking these records, even after I die!
Here are some record computations. If you know of any others let me know.
- On or about Dec 31, 1998, I computed 1 digit of the (additive inverse of ) **C**<sub>*MRB*</sub> with my TI-92s, by adding 1-sqrt(2)+3^(1/3)-4^(1/4)+... as far as I could. That first digit, by the way, is just 0. Then by using the sum feature, in approximate mode, to compute $\sum _{n=1}^{1000 } (-1)^n \left(n^{1/n}\right),$
I computed the first correct decimal of $\text{CMRB}=\sum _{n=1}^{\infty } (-1)^n \left(n^{1/n}-1\right)$ i.e. (.1). It gave (.1_91323989714) which is close to what Mathematica gives for summing to only an upper limit of 1000.
- On Jan 11, 1999, I computed 4 decimals(.1878) of **C**<sub>*MRB*</sub> with the Inverse Symbolic Calculator, with the command evalf( 0.1879019633921476926565342538468+sum((-1)^n* (n^(1/n)-1),n=140001..150000)); where 0.1879019633921476926565342538468 was the running total of t=sum((-1)^n* (n^(1/n)-1),n=1..10000), then t= t+the sum from (10001.. 20000), then t=t+the sum from (20001..30000) ... up to t=t+the sum from (130001..140000).
- In Jan of 1999, I computed 5 correct decimals (rounded to .18786)of **C**<sub>*MRB*</sub> using Mathcad 3.1 on a 50 MHz 80486 IBM 486 personal computer operating on Windows 95.
- Shortly afterward I tried to compute 9 digits of **C**<sub>*MRB*</sub> using Mathcad 7 professional on the Pentium II mentioned below, by summing (-1)^x x^(1/x) for x=1 to 10,000,000, 20,000,000, and a many more, then linearly approximating the sum to a what a few billion terms would have given.
- On Jan 23, 1999, I computed 500 digits of **C**<sub>*MRB*</sub> with an online tool called Sigma. Remarkably the sum in 4. was correct to 6 of the 9 decimal places! See
[http://marvinrayburns.com/Original_MRB_Post.html][75]
if you can read the printed and scanned copy there.
- In September of 1999, I computed the first 5,000 digits of **C**<sub>*MRB*</sub> on a 350 MHz Pentium II with 64 Mb of RAM using the simple PARI commands \p 5000;sumalt(n=1,((-1)^n*(n^(1/n)-1))), after allocating enough memory.
- On June 10-11, 2003 over a period, of 10 hours, on a 450 MHz P3 with an available 512 MB RAM, I computed 6,995 accurate digits of **C**<sub>*MRB*</sub>.
- Using a Sony Vaio P4 2.66 GHz laptop computer with 960 MB of available RAM, at 2:04 PM 3/25/2004, I finished computing 8000 digits of **C**<sub>*MRB*</sub>.
- On March 01, 2006, with a 3 GHz PD with 2 GB RAM available, I computed the first 11,000 digits of **C**<sub>*MRB*</sub>.
- On Nov 24, 2006, I computed 40, 000 digits of **C**<sub>*MRB*</sub> in 33 hours and 26 min via my program written in Mathematica 5.2. The computation was run on a 32-bit Windows 3 GHz PD desktop computer using 3.25 GB of Ram.
The program was something like this:
Block[{a, b = -1, c = -1 - d, d = (3 + Sqrt[8])^n,
n = 131 Ceiling[40000/100], s = 0}, a[0] = 1;
d = (d + 1/d)/2; For[m = 1, m < n, a[m] = (1 + m)^(1/(1 + m)); m++];
For[k = 0, k < n, c = b - c;
b = b (k + n) (k - n)/((k + 1/2) (k + 1)); s = s + c*a[k]; k++];
N[1/2 - s/d, 40000]]
- Finishing on July 29, 2007, at 11:57 PM EST, I computed 60,000 digits of **C**<sub>*MRB*</sub>. Computed in 50.51 hours on a 2.6 GHz AMD Athlon with 64 bit Windows XP. Max memory used was 4.0 GB of RAM.
- Finishing on Aug 3, 2007, at 12:40 AM EST, I computed 65,000 digits of **C**<sub>*MRB*</sub>. Computed in only 50.50 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 5.0 GB of RAM.
- Finishing on Aug 12, 2007, at 8:00 PM EST, I computed 100,000 digits of **C**<sub>*MRB*</sub>. They were computed in 170 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 11.3 GB of RAM. The typical daily record of memory used was 8.5 GB of RAM.
- Finishing on Sep 23, 2007, at 11:00 AM EST, I computed 150,000 digits of **C**<sub>*MRB*</sub>. They were computed in 330 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 22 GB of RAM. The typical daily record of memory used was 17 GB of RAM.
- Finishing on March 16, 2008, at 3:00 PM EST, I computed 200,000 digits of **C**<sub>*MRB*</sub> using Mathematica 5.2. They were computed in 845 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 47 GB of RAM. The typical daily record of memory used was 28 GB of RAM.
- Washed away by Hurricane Ike -- on September 13, 2008 sometime between 2:00 PM - 8:00 PM EST an almost complete computation of 300,000 digits of **C**<sub>*MRB*</sub> was destroyed. Computed for a long 4015. Hours (23.899 weeks or 1.4454*10^7 seconds) on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 91 GB of RAM. The Mathematica 6.0 code used follows:
Block[{$MaxExtraPrecision = 300000 + 8, a, b = -1, c = -1 - d,
d = (3 + Sqrt[8])^n, n = 131 Ceiling[300000/100], s = 0}, a[0] = 1;
d = (d + 1/d)/2; For[m = 1, m < n, a[m] = (1 + m)^(1/(1 + m)); m++];
For[k = 0, k < n, c = b - c;
b = b (k + n) (k - n)/((k + 1/2) (k + 1)); s = s + c*a[k]; k++];
N[1/2 - s/d, 300000]]
- On September 18, 2008, computation of 225,000 digits of **C**<sub>*MRB*</sub> was started with a 2.66 GHz Core 2 Duo using 64 bit Windows XP. It was completed in 1072 hours. Memory usage is recorded in the attachment pt 225000.xls, near the bottom of this post.
- 250,000 digits were attempted but failed to be completed to a serious internal error that restarted the machine. The error occurred sometime on December 24, 2008, between 9:00 AM and 9:00 PM. The computation began on November 16, 2008, at 10:03 PM EST. Like the 300,000 digit computation, this one was almost complete when it failed. The Max memory used was 60.5 GB.
- On Jan 29, 2009, 1:26:19 pm (UTC-0500) EST, I finished computing 250,000 digits of **C**<sub>*MRB*</sub>. with a multiple-step Mathematica command running on a dedicated 64 bit XP using 4 GB DDR2 RAM onboard and 36 GB virtual. The computation took only 333.102 hours. The digits are at http://marvinrayburns.com/250KMRB.txt. The computation is completely documented in the attached 250000.PD at bottom of this post.
- On Sun 28 Mar 2010 21:44:50 (UTC-0500) EST, I started a computation of 300000 digits of **C**<sub>*MRB*</sub> using an i7 with 8.0 GB of DDR3 RAM onboard, but it failed due to hardware problems.
- I computed 299,998 Digits of **C**<sub>*MRB*</sub>. The computation began Fri 13 Aug 2010 10:16:20 pm EDT and ended 2.23199*10^6 seconds later |
Wednesday, September 8, 2010. I used Mathematica 6.0 for Microsoft
Windows (64-bit) (June 19, 2007) That is an average of 7.44 seconds per digit. I used my Dell Studio XPS 8100 i7 860 @ 2.80 GHz with 8GB physical DDR3 RAM. Windows 7 reserved an additional 48.929
GB virtual Ram.
- I computed exactly 300,000 digits to the right of the decimal point
of **C**<sub>*MRB*</sub> from Sat 8 Oct 2011 23:50:40 to Sat 5 Nov 2011
19:53:42 (2.405*10^6 seconds later). This run was 0.5766 seconds per digit slower than the
299,998 digit computation even though it used 16 GB physical DDR3 RAM on the same machine. The working precision and accuracy goal
combination were maximized for exactly 300,000 digits, and the result was automatically saved as a file instead of just being displayed on the front end. Windows reserved a total of 63 GB of working memory of which 52 GB were recorded being used. The 300,000 digits came from the Mathematica 7.0 command
Quit; DateString[]
digits = 300000; str = OpenWrite[]; SetOptions[str,
PageWidth -> 1000]; time = SessionTime[]; Write[str,
NSum[(-1)^n*(n^(1/n) - 1), {n, \[Infinity]},
WorkingPrecision -> digits + 3, AccuracyGoal -> digits,
Method -> "AlternatingSigns"]]; timeused =
SessionTime[] - time; here = Close[str]
DateString[]
- 314159 digits of the constant took 3 tries due to hardware failure. Finishing on September 18, 2012, I computed 314159 digits, taking 59 GB of RAM. The digits came from the Mathematica 8.0.4 code
DateString[]
NSum[(-1)^n*(n^(1/n) - 1), {n, \[Infinity]},
WorkingPrecision -> 314169, Method -> "AlternatingSigns"] // Timing
DateString[]
- Sam Noble of Apple computed 1,000,000 digits of **C**<sub>*MRB*</sub> in 18 days 9 hours 11 minutes 34.253417 seconds.
- Finishing on Dec 11, 2012, Richard Crandall, an Apple scientist, computed 1,048,576 digits
in a lightning-fast 76.4 hours computation time (from the timing command). That's on a 2.93 GHz 8-core Nehalem.
- In Aug of 2018, I computed 1,004,993 digits of **C**<sub>*MRB*</sub> in 53.5 hours with 10 DDR4 RAM (of up to 3000 MHz) supported processor cores overclocked up to 4.7 GHz! Search this post for "53.5" for documentation.
- Sept 21, 2018: I computed 1,004,993 digits of **C**<sub>*MRB*</sub>
in 50.37 hours of absolute time (35.4 hours computation time) with 18
(DDR3 and DDR4) processor cores! Search this post for "50.37 hours"
for documentation.**
- On May 11, 2019, I computed over 1,004,993 digits, using 28 kernels
on 18 DDR4 RAM (of up to 3200 MHz) supported cores overclocked up to
5.1 GHz in 45,5 hours of absolute time and only 32.5 hours of computation time! Search 'Documented in the attached ":3 fastest
computers together 3.nb." ' for the post that has the attached documenting notebook.
- On 10/19/20, using 3/4 of the MRB constant supercomputer 2, I finished an over 1,004,993 digits computation of **C**<sub>*MRB*</sub> in 44 hours of absolute time -- see [https://www.wolframcloud.com/obj/bmmmburns/Published/44%20hour%20million.nb][76] for documentation.
- I computed a little over 1,200,000 digits of **C**<sub>*MRB*</sub> in 11
days, 21 hours, 17 minutes, and 41 seconds (finishing on March 31, 2013). I used a six-core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz.
- On May 17, 2013, I finished a 2,000,000 or more digit computation of **C**<sub>*MRB*</sub>, using only around 10GB of RAM. It took 37 days 5 hours 6 minutes 47.1870579 seconds. I used my six-core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz.
- A previous world record computation of **C**<sub>*MRB*</sub> was finished on Sun 21 Sep 2014 at 18:35:06. It took 1 month 27 days 2 hours 45 minutes 15 seconds. The processor time from the 3,000,000+ digit computation was 22 days. I computed the 3,014,991 digits of **C**<sub>*MRB*</sub> with Mathematica 10.0. I Used my new version of Richard Crandall's code in the attached 3M.nb, optimized for my platform and large computations. I also used a six-core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz with 64 GB of RAM of which only 16 GB was used. Can you beat it (in more number of digits, less memory used, or less time taken)? This confirms that my previous "2,000,000 or more digit computation" was accurate to 2,009,993 digits. they were used to check the first several digits of this computation. See attached 3M.nb for the full code and digits.
- Finished on Wed 16 Jan 2019 19:55:20, I computed over 4 million digits of **C**<sub>*MRB*</sub>.
It took 4 years of continuous tries. This successful run took 65.13 days computation time, with a processor time of 25.17 days, on a 3.7 GHz overclocked up to 4.7 GHz on all cores Intel 6 core computer with 3000 MHz RAM. According to this computation, the previous record, 3,000,000+ digit computation, was accurate to 3,014,871 decimals, as this computation used my algorithm for computing n^(1/n) as found in chapter 3 in the paper at
https://www.sciencedirect.com/science/article/pii/0898122189900242
and the 3 million+ computation used Crandall's algorithm. Both algorithms outperform Newton's method per calculation and iteration.
See attached [notebook][77].
M R Burns' algorithm:
x = SetPrecision[x, pr];
y = x^n; z = (n - y)/y;
t = 2 n - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr] (n - 1)/t2 + (n + 1) z/(2 n t) -
SetPrecision[13.5, pr] n (n - 1) 1/(3 n t2 + t^3 z));
(*N[Exp[Log[n]/n],pr]*)
Example:
ClearSystemCache[]; n = 123456789;
(*n is the n in n^(1/n)*)
x = N[n^(1/n),100];
(*x starts out as a relatively small precision approximation to n^(1/n)*)
pc = Precision[x]; pr = 10000000;
(*pr is the desired precision of your n^(1/n)*)
Print[t0 = Timing[While[pc < pr, pc = Min[4 pc, pr];
x = SetPrecision[x, pc];
y = x^n; z = (n - y)/y;
t = 2 n - 1; t2 = t^2;
x = x*(1 + SetPrecision[4.5, pc] (n - 1)/t2 + (n + 1) z/(2 n t)
- SetPrecision[13.5, pc] n (n - 1)/(3 n t2 + t^3 z))];
(*You get a much faster version of N[n^(1/n),pr]*)
N[n - x^n, 10]](*The error*)];
ClearSystemCache[]; n = 123456789; Print[t1 = Timing[N[n - N[n^(1/n), pr]^n, 10]]]
Gives
{25.5469,0.*10^-9999984}
{101.359,0.*10^-9999984}
R Crandall's algorithm:
While[pc < pr, pc = Min[3 pc, pr];
x = SetPrecision[x, pc];
y = x^n - n;
x = x (1 - 2 y/((n + 1) y + 2 n n));];
(*N[Exp[Log[n]/ n],pr]*)
Example:
ClearSystemCache[]; n = 123456789;
(*n is the n in n^(1/n)*)
x = N[n^(1/n)];
(*x starts out as a machine precision approximation to n^(1/n)*)
pc = Precision[x]; pr = 10000000;
(*pr is the desired precision of your n^(1/n)*)
Print[t0 = Timing[While[pc < pr, pc = Min[3 pc, pr];
x = SetPrecision[x, pc];
y = x^n - n;
x = x (1 - 2 y/((n + 1) y + 2 n n));];
(*N[Exp[Log[n]/n],pr]*)
N[n - x^n, 10]](* The error*)]; Print[
t1 = Timing[N[n - N[n^(1/n), pr]^n, 10]]]
Gives
{32.1406,0.*10^-9999984}
{104.516,0.*10^-9999984}
More information available upon request.
----------
- Finished on Fri 19 Jul 2019 18:49:02, I computed over 5 million digits of **C**<sub>*MRB*</sub>.
Methods described in the reply below that starts with "Attempts at a 5,000,000 digit calculation ."
For this 5 million calculation of MRB using the 3 node MRB supercomputer:
processor time was 40 days.
and the actual time was 64 days.
That is faster than the 4 million digit computation using just one node.
- I finally computed 6,000,000 digits of the MRB constant after 8 tries in 19 months. (Search "8/24/2019 It's time for more digits!" below.) finishing on Tue 30 Mar 2021 22:02:49 in 160 days.
The MRB constant supercomputer 2 said the following:
Finished on Tue 30 Mar 2021 22:02:49. Processor and actual time were 5.28815859375*10^6 and 1.38935720536301*10^7 s. respectively
Enter MRB1 to print 6029991 digits. The error from a 5,000,000 or more digit calculation that used a different method is
0.*10^-5024993
That means that the 5,000,000 digit computation Was actually accurate to 5024993 decimals!!!
Also, beyond any shadow of a doubt, I verified 5,609,880 digits of the MRB constant on Thu 4 Mar 2021 08:03:45. The 5,500,000+ digit computation using a totally different method showed that many decimals are in common with the 6,000,000+ digit computation.
----------
----------
----------
----------
Here is my mini-cluster of the fastest 3 computers (the MRB constant supercomputer 0) mentioned below:
The one to the left is my custom-built extreme edition 6 core and later with an 8 core Xeon processor.
The one in the center is my fast little 4 core Asus with 2400 MHz RAM.
Then the one on the right is my fastest -- a Digital Storm 6 core overclocked to 4.7 GHz on all cores and with 3000 MHz RAM.
![first 3 way cluster][78]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1ac.JPG&userId=366611
[2]: http://mathworld.wolfram.com/MRBConstant.html
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture30.JPG&userId=366611
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-14113747.png&userId=366611
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-14085836.png&userId=366611
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-14085338.png&userId=366611
[7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=every.JPG&userId=366611
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture8.PNG&userId=366611
[9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture10.PNG&userId=366611
[10]: https://www.wolframcloud.com/obj/bmmmburns/Published/Nov_9_2021.nb
[11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1253Capture11.PNG&userId=366611
[12]: https://www.wolframcloud.com/obj/bmmmburns/Published/T18_25_22plus%20n.nb
[13]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5700Capture23.JPG&userId=366611
[14]: https://www.wolframcloud.com/obj/bmmmburns/Published/Oct_18_2021.nb
[15]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture31.JPG&userId=366611
[16]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1160Capture19.JPG&userId=366611
[17]: https://www.wolframcloud.com/obj/bmmmburns/Published/Oct_10_2021.nb
[18]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8236Capture20.JPG&userId=366611
[19]: https://www.wolframcloud.com/obj/bmmmburns/Published/Oct_11_2021.nb
[20]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5014Capture14.JPG&userId=366611
[21]: https://community.wolfram.com//c/portal/getImageAttachment?filename=6390Capture15.JPG&userId=366611
[22]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5131Capture9.JPG&userId=366611
[23]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10878Capture.JPG&userId=366611
[24]: https://www.wolframcloud.com/obj/bmmmburns/Published/Sept_5_2021.nb
[25]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8785Capture1.JPG&userId=366611
[26]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10043Capture2.JPG&userId=366611
[27]: https://community.wolfram.com//c/portal/getImageAttachment?filename=75504.JPG&userId=366611
[28]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture21%281%29.JPG&userId=366611
[29]: https://community.wolfram.com//c/portal/getImageAttachment?filename=9644Capture.JPG&userId=366611
[30]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture23.JPG&userId=366611
[31]: https://community.wolfram.com//c/portal/getImageAttachment?filename=115335.JPG&userId=366611
[32]: https://www.wolframcloud.com/obj/bmmmburns/Published/double%20zeroes%20of%20CMRB.nb
[33]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11i.JPG&userId=366611
[34]: https://community.wolfram.com//c/portal/getImageAttachment?filename=6033d.JPG&userId=366611
[35]: https://math.stackexchange.com/users/332823/user90369
[36]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1558a.JPG&userId=366611
[37]: https://digitalcommons.wku.edu/cgi/viewcontent.cgi?referer=http://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=27&ved=2ahUKEwjMx5SuxbnjAhVLLpoKHcBPBWo4FBAWMAZ6BAgAEAI&url=http://digitalcommons.wku.edu/cgi/viewcontent.cgi?article=2093&context=theses&usg=AOvVaw0gQx0dl_Nw4esC2IQc0LEo&httpsredir=1&article=2093&context=theses
[38]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2965b.JPG&userId=366611
[39]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11ka.JPG&userId=366611
[40]: https://community.wolfram.com//c/portal/getImageAttachment?filename=84481.JPG&userId=366611
[41]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1869Capture.JPG&userId=366611
[42]: https://community.wolfram.com//c/portal/getImageAttachment?filename=6878p1o2.jpg&userId=366611
[43]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5630Capture2.JPG&userId=366611
[44]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11k.JPG&userId=366611
[45]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1593Capture1.JPG&userId=366611
[46]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5191Capture3.JPG&userId=366611
[47]: https://community.wolfram.com//c/portal/getImageAttachment?filename=47625a.JPG&userId=366611
[48]: https://community.wolfram.com//c/portal/getImageAttachment?filename=6657Capture12.JPG&userId=366611
[49]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2081Capture14.JPG&userId=366611
[50]: https://community.wolfram.com//c/portal/getImageAttachment?filename=left.gif&userId=366611
[51]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3959Capture7.JPG&userId=366611
[52]: https://community.wolfram.com//c/portal/getImageAttachment?filename=right.gif&userId=366611
[53]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10297Capture.JPG&userId=366611
[54]: https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal
[55]: https://en.wikipedia.org/wiki/Riemann_series_theorem
[56]: https://www.math.ucdavis.edu/~hunter/intro_analysis_pdf/ch4.pdf
[57]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7211Capture.JPG&userId=366611
[58]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10837Capture.JPG&userId=366611
[59]: https://community.wolfram.com//c/portal/getImageAttachment?filename=46311.PNG&userId=366611
[60]: https://community.wolfram.com//c/portal/getImageAttachment?filename=580910.JPG&userId=366611
[61]: http://community.wolfram.com/groups/-/m/t/1323951?p_p_auth=W3TxvEwH
[62]: https://community.wolfram.com//c/portal/getImageAttachment?filename=28491.JPG&userId=366611
[63]: https://community.wolfram.com//c/portal/getImageAttachment?filename=76812.JPG&userId=366611
[64]: https://community.wolfram.com//c/portal/getImageAttachment?filename=100173.JPG&userId=366611
[65]: https://community.wolfram.com//c/portal/getImageAttachment?filename=57664.JPG&userId=366611
[66]: https://community.wolfram.com//c/portal/getImageAttachment?filename=74665.JPG&userId=366611
[67]: https://community.wolfram.com//c/portal/getImageAttachment?filename=49236.JPG&userId=366611
[68]: https://community.wolfram.com//c/portal/getImageAttachment?filename=15127.JPG&userId=366611
[69]: https://community.wolfram.com//c/portal/getImageAttachment?filename=92858.JPG&userId=366611
[70]: https://community.wolfram.com//c/portal/getImageAttachment?filename=49309.JPG&userId=366611
[71]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3.PNG&userId=366611
[72]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1021422.JPG&userId=366611
[73]: https://www.wolframcloud.com/obj/b72d7291-a801-496f-977a-34dfd55350c2
[74]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8a.JPG&userId=366611
[75]: http://marvinrayburns.com/Original_MRB_Post.html
[76]: https://www.wolframcloud.com/obj/bmmmburns/Published/44%20hour%20million.nb
[77]: https://community.wolfram.com/groups?p_auth=zWk1Qjoj&p_p_auth=r1gPncLu&p_p_id=19&p_p_lifecycle=1&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=6&_19_struts_action=/message_boards/get_message_attachment&_19_messageId=1593151&_19_attachment=4%20million%2011%202018.nb
[78]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ezgif.com-video-to-gif.gif&userId=366611Marvin Ray Burns2014-10-09T18:08:49ZUnderstanding sentiment analysis in Mathematica
https://community.wolfram.com/groups/-/m/t/2415187
I have a project to analyze some letters that Bertrand Russell, the logician and philosopher, wrote while imprisoned during 1918 for his writings about WWI.
As I understand the classifier, it uses words and phrases classified for sentiment, and predicts the sentiment of the word or phrase provided. In her book *Artificial Intelligence* Melanie Mitchell discusses sentiment analysis saying that the network is trained on human-labeled examples, it learns useful features, and outputs a classification confidence.
I expect this is the method for the Mathematica classifier. This implies a larger amount of training data. Is this the Mathematica method.
The data sources are important because language changes over time.
There are examples of using Mathematica to analyze sentiment in some of Shakespeare’s work from 400 years ago. The change in language and meaning doesn’t seem to affect the analysis.
Is the classifier suitable for text written in 1918?Dan O'Leary2021-11-29T21:37:47ZWolfram quantum computation framework: a few examples
https://community.wolfram.com/groups/-/m/t/2416125
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/903fbf05-4986-4a5d-84e4-f6f44a4ad96fMads Bahrami2021-11-30T17:22:04ZConverting chess OBJ files to voxels
https://community.wolfram.com/groups/-/m/t/2413178
![enter image description here][1]
In [another recent thread][2] we announced the existence of voxel chess pieces originally painted in [MagicaVoxel][3], but could not access them in Mathematica because of a fail case involving ".vox" file format. The purpose of this memo is to show how files exported to OBJ can be converted back to voxels, and to give away [a few more free assets][4].
Pull down the [OBJ files from github][5], then import and print:
PieceData = Import["~/mathfun/" <> # <> ".obj"] & /@ {"pawn", "rook", "knight",
"bishop", "queen", "king"};
GraphicsGrid[ Partition[Show[Region@#,
Graphics3D[Arrow[{{0, 0, 0}, 6 #}] & /@ IdentityMatrix[3]],
ViewVertical -> {0, 1, 0}, ViewPoint -> {2, 0, 2},
PlotRange -> {{-6, 6}, {-1, 20}, {-6, 6}}] & /@ PieceData, 3]]
![Chess Regions][6]
Validation data
RegionMember[Region[PieceData[[6]]], {0, 0, 0}]
RegionMember[Region[PieceData[[6]]], {0, 1, 0}]
RegionDimension@Region[PieceData[[6]]]
SolidRegionQ@Region[PieceData[[6]]]
Out[]:= True
Out[]:= False
Out[]:= 2
Out[]:= False
We would rather that this output read T,T,3,T, and are unaware whether or not region management is built out to this capability (?). That leaves us the task of identifying boundaries, surface normals, and putting voxel blocks in place, hopefully with color. Assuming the OBJ file is consistent with a VOX decomposition, we can use preexisting region functions to identify control points on the two-dimensional surface:
BoundaryPoints[GeoOBJ_] := With[{SlabPts = Flatten[
Table[{i/2, j/2, k/2}, {i, -6, 6}, {j, 0, 32}, {k, -6, 6}], 2]},
Select[SlabPts, Element[#, Region[GeoOBJ]] &]]
In this case, we know the size of the slab, the origin of coordinates, and the length of the line element, so we don't need too much automation or corner finding. There are at least two good reasons for using halves in discretization of the slab, but you can think of those for yourself.
To get out square facets, we look for nearest neighbors and next nearest neighbors in the sub lattice found by intersection with whichever GeoOBJ.
ListEdges[BoundaryPts_] := With[{EdgeSet =
Edge[#, Nearest[Complement[BoundaryPts, {#}], #]] & /@
BoundaryPts}, {EdgeSet, Edge[#[[1]],
Nearest[Complement[ BoundaryPts, # /.
Edge[x_, y_] :> Append[y, x]], #[[1]] ] ] & /@ EdgeSet}]
Facet[pt_, nNeighbors_, nnNeighbors_] := MapIndexed[
ReplaceAll[ Flatten[Position[#1, 1/2, 1]], {{x_Integer, y_Integer} :>
Polygon[ {pt, nNeighbors[[x]], nnNeighbors[[#2[[1]] ]],
nNeighbors[[y]] }], _ -> {}}] &,
Outer[EuclideanDistance, nnNeighbors, nNeighbors, 1]]
BoundaryDiscretize[GeoOBJ_] := Union[Flatten[
MapThread[Facet[#1[[1]], #1[[2]], #2[[2]]] &,
ListEdges[BoundaryPoints[GeoOBJ ]] ]]];
AbsoluteTiming[AllFacets = BoundaryDiscretize[#] & /@ PieceData;]
Out[]={48.1591, Null}
It seems to take too long, but we are not yet at the finalization stage of needing to optimize. Actually, we have just started (as C.H. was saying yesterday, sort of). Printing Again:
GraphicsGrid[Partition[Show[Graphics3D[#],
Graphics3D[Arrow[{{0, 0, 0}, 6 #}] & /@ IdentityMatrix[3]],
ViewVertical -> {0, 1, 0}, ViewPoint -> {2, 0, 2}, Boxed -> False,
PlotRange -> {{-6, 6}, {-1, 20}, {-6, 6}}] & /@ AllFacets, 3],
ImageSize -> 500]
![Faceted Chess Pieces][7]
These should be relatively easy to color, facet by facet, except that we may still have duplicate facets in the extracted data. If we just print some random coloring, that doesn't matter:
lens = Length /@ AllFacets;
cols = Table[Blend[{Hue[RandomReal[{0, 1}]], Pink}], {#}] & /@ lens;
Show[Graphics3D[Transpose[{cols[[3]], AllFacets[[3]]}]],
Graphics3D[Arrow[{{0, 0, 0}, 6 #}] & /@ IdentityMatrix[3]],
ViewVertical -> {0, 1, 0}, ViewPoint -> {2, 0, 2}, Boxed -> False,
PlotRange -> {{-6, 6}, {-1, 12}, {-6, 6}}, ImageSize -> 700]
![pink rainbow knight][8]
Okay this looks too much like a discothèque, so for the sake of simplicity, we next need to refine until the facets of each voxel share the same color. More work to be done in the next few days or weeks, but we seem to be making progress.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Image20211130000517.png&userId=20103
[2]: https://community.wolfram.com/groups/-/m/t/2407317
[3]: https://ephtracy.github.io/
[4]: https://github.com/bradklee/OpenAssets
[5]: https://github.com/bradklee/OpenAssets/tree/main/WorldChess/OBJ
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ChessPieceRegions.png&userId=234448
[7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ChessPieceFacets.png&userId=234448
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=PinkKnight.png&userId=234448Brad Klee2021-11-24T15:37:34Z"Unspelling", unique tetragrams, or Wolfram wordplay
https://community.wolfram.com/groups/-/m/t/2287865
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/f324fc87-a89b-482a-9cdd-b2536c988206Bill Gosper2021-06-10T18:45:45ZHow to embed a YouTube video in a cloud notebook
https://community.wolfram.com/groups/-/m/t/410913
Hi,
I am attempting to embed a YouTube video in a cloud notebook. Wolfram says it is available in Mathematica Online in his announcement. However, I can't figure it out. Has anyone successfully done this? If so, can you give me a peek at your function calls? Thanks.
MikeMichael McCain2014-12-21T03:15:37Z880 magic squares of order 4 by Frenicle and Fitting
https://community.wolfram.com/groups/-/m/t/2413789
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/d7bb09e5-0989-4e0e-963e-d9071bcc33b0
[Original NB]: https://www.wolframcloud.com/obj/a97802de-2af6-4993-9f6d-237b2fca4729Oliver Seipel2021-11-26T18:46:18ZHow to speed up NIntegrate for an integral?
https://community.wolfram.com/groups/-/m/t/2416012
Hello, I am trying to evaluate numerically an integral of a fairly complicated function. Here is my code:
K1K0[x_]=BesselK[1,x]/BesselK[0,x];
J0J0Y0Y0[z_]:=BesselJ[0,z]*BesselJ[0,z]+BesselY[0,z]*BesselY[0,z];
J1J1Y1Y1[z_]:=BesselJ[1,z]*BesselJ[1,z]+BesselY[1,z]*BesselY[1,z];
J0J1Y0Y1[z_]:=BesselJ[0,z]*BesselJ[1,z]+BesselY[0,z]*BesselY[1,z];
G1[w_,kap_]:=(kap-w)*((K1K0[Sqrt[kap-w]])^2)*J0J0Y0Y0[Sqrt[w]];
G2[w_,kap_]:=Sqrt[w*(kap-w)]*K1K0[Sqrt[kap-w]]*J0J1Y0Y1[Sqrt[w]];
G3[w_,kap_]:=w*J1J1Y1Y1[Sqrt[w]];
BESSELTERM[w_,kap_]:=((kap-w)/w)*((K1K0[Sqrt[kap-w]])^2)/(G1[w,kap]+2*th*G2[w,kap]+th*th*G3[w,kap]);
u = 4;
th = Exp[u];
t=1;
k=1000;
result=(2/π^2)*NIntegrate[BESSELTERM[1/y,k]*Exp[-t/y]/y^2,{y,1/k,∞},Method->"GaussKronrodRule",MaxRecursion->40,WorkingPrecision->16];
CForm[N[result,30]]
The result of running this code is obtained in a few seconds and it is: 0.3924117267170341.
However, the result is not very accurate. I need about 30-35 accurate digits. But if I set WorkingPrecision->35, then the code slows down enormously, and the result is obtained in about half an hour. In addition, I need to vary the parameter u up to u=50, and I observe that the computational time rapidly increases with u for u > 4. Parameters t and k may also vary in the intervals -6 <=log10(t)<=6 and -3<=log10(k)<=3, which often causes error messages from MATHEMATICA, to avoid which WorkingPrecision has to be increased, which seems to further increase the cost. Is there any way to speed up these calculations, perhaps by chosing other options of NIntegrate? I don't understand why these calculations are so slow. Function BESSELTERM[w_,kap_] is singular t w=0. LesławLeslaw Bieniasz2021-11-30T15:19:30ZGravitational force simulation resources?
https://community.wolfram.com/groups/-/m/t/2415569
Hello,
I am relatively new to Wolfram. After searching appropriate solutions I want to focus here for a project of gravitational force testing. There are so many opportunities and diversity of application here.
Defined by [Skylark Micro][1] rocket technology of testing facilities in reality.
The purpose is to create pre-test conditions, which will be able to input materials, 3D construction and put it to a certain simulation load.
For any guidance, from where to start thank you in advance.
[1]: https://www.skyrora.com/skylark-microLariliss Liss2021-11-30T10:31:44ZUnder which conditions RandomVariate Take a value from symbolic dist ?
https://community.wolfram.com/groups/-/m/t/2415631
RandomVariate[ParetoDistribution[2, 1], 1]
What is the "probabilistic criteria" that RandomVariate use in order to take one value from Pareto Distribution. Is it done under a Normal Distribution, binormal...etc?kevin Robalino2021-11-30T03:40:55ZChanging the OpenerView arrow color and size
https://community.wolfram.com/groups/-/m/t/2415484
Currently OpenerView uses, on MacOS 11.6, a small arrow icon. When I use the large size the arrow is indeed larger but red! There has to be some way to remove the red or use another shape/glyph for the arrow. The small size is just too small for us who are visually impaired. Thanks.Andrew Meit2021-11-30T01:29:58ZAutomatically calculate equation's discriminant and Veda？
https://community.wolfram.com/groups/-/m/t/2397594
Collect[SubtractSides[
Eliminate[{x^2/a^2 + y^2/b^2 == 1, y == k x + m}, y], x], x]
SubtractSides[%]
MultiplySides[%, a^2, GenerateConditions -> False]
Collect[%, x, Apart]
The above code makes the univariate quadratic equation obtained by combining the binary quadratic equation and the binary quadratic equation, and then how to automatically calculate its discriminant and Weida (the sum of two roots and the product of two roots).lee tao2021-11-01T11:21:26ZKinematics of 3D printed anti earthquake system that mimics human bones
https://community.wolfram.com/groups/-/m/t/2415323
*WOLFRAM MATERIALS for the ARTICLE:*
> Fraternali, F., Singh, N., Amendola, A., Benzoni, G., Milton, G.W.
> A biomimetic sliding-stretching approach to seismic isolation.
> NONLINEAR DYNAMICS (2021), DOI: https://doi.org/10.1007/s11071-021-06980-5
> NATURE, Research Highlights: https://www.nature.com/articles/d41586-021-03506-2
> [Full article in PDF][1]
![enter image description here][2]
&[Wolfram Notebook][3]
[1]: https://link.springer.com/content/pdf/10.1007/s11071-021-06980-5.pdf
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=d41586-021-03506-2_19896092.gif&userId=20103
[3]: https://www.wolframcloud.com/obj/e97c56e0-8896-44ef-aa0c-ab291da4c73dFernando Fraternali2021-11-29T18:52:25ZInterpolation function error: Part doesn't exist
https://community.wolfram.com/groups/-/m/t/2415095
Problem:
I import a list of values (POCinput) and transform it into an "InterpolationFunction" to be used as initial condition:
INIPOCn =
POC[x, 0] ==
Interpolation[Transpose[List[Table[x, {x, 0, L}], << POCinput]]]
POC[x,0]==InterpolatingFunction[Domain: {{0.,100.}}
Output: scalar
When using this input in "NDSolve" I receive the following error messages:
Part::partw: Part 4 of POC[x,0]==InterpolatingFunction[{{0.,100.}},{5,7,0,{101},{4},0,0,0,0,Automatic,<<3>>},{{0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,<<91>>}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,<<92>>},0.00838574,0.00834735,0.0083137,0.00828387,0.00825718,0.00823311,0.00821125,0.00819128,0.00817292,0.00815598,<<91>>}},{Automatic}] does not exist.
NDSolve::deqn: Equation or list of equations expected instead of (POC[x,0]==InterpolatingFunction[{{0.,100.}},{5,7,0,{101},{4},0,0,0,0,Automatic,<<3>>},{{0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,<<91>>}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,<<92>>},{0.00838574,0.00834735,0.0083137,0.00828387,0.00825718,0.00823311,0.00821125,0.00819128,0.00817292,0.00815598,<<91>>}},{Automatic}])[[4,3]] in the first argument {2.65 (0.45 -0.1 E^(-x/20000)) (POC^(0,1))[x,t]==-((2.65 (0.45 -0.1 E^Times[<<2>>]) POC[x,t])/(1000. +100. x)^1.4)-0.011925 (POC^(1,0))[x,t],0.011925 POC[0,t]==0.0001,(POC[x,0]==InterpolatingFunction[{{0.,100.}},{5,7,0,{101},{4},0,0,0,0,Automatic,<<3>>},{{0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,<<91>>}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,<<92>>},{0.00838574,0.00834735,0.0083137,0.00828387,0.00825718,0.00823311,0.00821125,0.00819128,0.00817292,0.00815598,<<91>>}},{Automatic}])[[4,3]],<<5>>,Cl[0,t]==555.,Li[0,t]==0.024,<<9>>}.
Any idea what is wrong here? The input should be a scalar function, which is the case.
Thanks for suggestions...Christian Hensen2021-11-29T10:00:50ZSum error: overflow occurred in computation?
https://community.wolfram.com/groups/-/m/t/2411891
Following is my code and I want to plot the attached plots.Zeeshan Haider2021-11-23T07:32:34ZFMU export fails for a block with algorithm section and discrete variables
https://community.wolfram.com/groups/-/m/t/2413950
I'm trying to export a Co-simulation FMU (2.0) of a model with a block class with discrete variables and an algorithm section but it gives errors when compiling. I can't post the
whole code of the block here because I'm not authorized by the company. But the block code is something like:
block model_name
Real real_var1;
Modelica.Blocks.Interfaces.RealInput array_input_var1[10];
Modelica.Blocks.Interfaces.RealOutput output_var1;
parameter Integer int_limit;
Boolean bool_var1;
Integer int_var1;
equation
real_var1 = array_input_var1[0];
algorithm
if array_input_var1[0] > 8.0 and int_var1 < int_limit then
int_var1:=int_var1+1;
elseif array_input_var1[0] <8.0 and int_var1 > 1 then
int_var1:=int_var1-1;
else
int_var1:=0;
end if;
if real_var1 > 5.0 and int_var1 >1 then
bool_var1 := true;
else
bool_var1 := false;
end if;
output_var1 := array_input_var1[1] + real_var1;
end model_name
The code above may not make too much sense but it is just to give an idea. The main problem is with the discrete variables. Also the block inputs and outputs are connected with other blocks. Its is part of a bigger model.
When I try to export I receive the following error:
> [Absyn::0:0-0:0] Internal error:
> ClassifyEquations.buildContinuousSystem: Expected non-discrete-valued
> variables to be continuous-valued: bool_var1
> (DAELowTypes.DISCRETE_TIME{ state = false; }))
Variable name changed to match the code example. and If I comment the boolean variable i have an error with the integer variable:
> [Absyn::0:0-0:0] Internal error:
> SimCodegen.generateNonlinearSystemSingleAlgorithmResidual:
> Discrete-valued algorithm outputs not matched to algorithm: int_var1
Again variable name changed to match the code example. I also tried to put
the **discrete** keyword before the boolean and integer variables, but it didn't help. Any ideas of what is causing this problem ?
System information:
Product version: 12.1.0.8 <br />
Client: Model Center <br />
Client version: 12.1.0.30 <br />
Client creation date: 2020-03-02T13:38:32.855263 <br />
Client build revisions: S:2b715d78e, J:6a53ed2a2, L:41ddb1b72 <br />
Client build type: 64 bit <br />
Kernel version: 12.1.0.34 <br />
Kernel creation date: 2020-03-02T13:39:13.038056 <br />
Kernel build revisions: S:2b715d78e, J:6a53ed2a2, L:41ddb1b72 <br />
Platform: Ubuntu 14.04.6 LTS <br />Michel Oliveira2021-11-26T19:18:11ZFinding a limit-value of a function
https://community.wolfram.com/groups/-/m/t/2414280
Hello, Colleagues
I have tried to find the limit value of a function.
f(x1,x2) = (x1^n + x2^n)^(1/n), as n->infinity.
As you know, if x1<x2, the limit value becomes x2.
Mathematica always gives x2 with a condition, and this condition is ' if Log[x1]>0&&Log[x1]<Log[x2]&&Log[x2]>0' which is different from x1<x2.
My question is whether it is possible to get x2 with the condition x1<x2.
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/8a6e50f6-411f-4996-984d-d4c8501e986dWoncheol Jeong2021-11-27T05:59:11ZArg of roots of a complex number?
https://community.wolfram.com/groups/-/m/t/2413966
Consider
SolveValues[z^3 == (1 - I) Sqrt[2], z] // AbsArg
{{2^(1/3), -(\[Pi]/12)}, {2^(1/3),
Arg[-(-1)^(1/3) (1 - I)^(1/3)]}, {2^(1/3),
Arg[(-1)^(2/3) (1 - I)^(1/3)]}}
The first root is presented in the expected polar form of a complex number. But Arg has trouble with the other two roots because SolveValues (Solve is the same) doesn't seem to complete the solution (leaving ^(1/3)) behind.
This should be easy. Any suggestions to obtain the expected roots of complex numbers?Andrew Read2021-11-26T22:53:34ZCan you parallelize a numerically solved Integral?
https://community.wolfram.com/groups/-/m/t/2411713
Hello,
I have recently made use of a numerical integration method (Gaussian Quadrature) to solve very complex integrals for research. While the results have been good, and are much faster than any other numerical integration method I have used so far, it can still take hours to solve certain complicated integrals. However, I know my laptop is far faster when utilizing its multi-core processor. It is possible to modify this integration scheme to solve in parallel? The notebook uses a simple example of solving for an integral of cosine but this can be scaled up for more complicated examples.&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/17de5bec-2dd0-4832-95d6-48cca16e57f1sorabella912021-11-22T19:54:37Z[GiF] Love heart jewelry II: 3D scene on wave
https://community.wolfram.com/groups/-/m/t/2413698
![enter image description here][1]
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=wave_60_1.gif&userId=20103
[2]: https://www.wolframcloud.com/obj/4366d3d0-2f22-4415-ac61-566d5cec042c
[Original notebook]: https://www.wolframcloud.com/obj/ef6a9b2a-1f33-450e-b6ac-55ba9fea270cFrederick Wu2021-11-26T15:13:41ZTorn Equations and solving Nonlinear problems within SystemModeler
https://community.wolfram.com/groups/-/m/t/2403814
I am working on a little project to help learn more of SystemModeler and modeling within that environment.
I have a working physical test bench of the system I choose to simulate, I would like to simulate and design and test different control schemes via SystemModeler, Mathematica and the Microcontroller Kit.
The system being a 3d inverted pendulum, like the [Cubli][1].
When simulating the single degree of freedom, I have great stabilization.
![single degree][2]
This model is in-fact the second version of it I have designed, the first version using `Bodyshapes` classes while this newer version uses `Rotorswith3Deffects`
I have changed the model to use the rotors as the angle/control reactions in the first did not reflect reality with the physical test bench, while the newer version is almost nearly identical...but I digress.
When inverting this model to stand on its corner to be a 3DOF, 3D pendulum, I am now getting constant "torn" errors, which I can view with the Equation browser, however I can't begin to understand how this is helpful, or what I can do, beyond what it *seems* to be setting initial conditions to repair the problem...this however leads to an ever increasing cascade in *more* torn system errors. ![torn][3]
My model isn't particularly large I think but I am using several custom subsystems and functions, I realize, but for an idea of what I have built, see the below images.
The *working* Single DOF system with control.
![single][4]
The Same system with 3 DOF activated, causing torn system.
![3dof][5]
I don't think this is a particularly interesting or difficult nonlinear system to Solve for SystemModeler...I feel this has something to do with the `Rotorswith3dEffects` but since this works in the 1DOF systems, I am somewhat at a loss.
How can I fix the torn system via the equation browser? Is this is the wrong direction to follow? Is there a better way or thing to look out for?
I have looked at the `GyroscopicEffects` example from recommendations from previous questions...which is how I managed to come up with the model I have (which again works great in the 1DOF simulation).
My physical test bench for reference:
![enter image description here][6]
[1]: https://www.youtube.com/watch?v=n_6p-1J551Y
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-10at13.06.33.png&userId=1222283
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-10at13.17.40.png&userId=1222283
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-10at13.19.59.png&userId=1222283
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshot2021-11-10at13.25.10.png&userId=1222283
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=0F2B6A00-0719-46B8-B365-7F99323C99B9.JPG&userId=1222283Mor Bo2021-11-10T12:38:29ZInvalid AppID using the Wolfram|Alpha Python library
https://community.wolfram.com/groups/-/m/t/2414453
As title says, I've been trying to use the Wolfram|Alpha Python library, however 99% of the time, when I try to query anything, it errors out saying "Exception: Error 1: Invalid appid"
I created my app a couple weeks ago si it can't be the appid not being yet registered in the system. Sometimes it weirdly works once, and then it stops working again for the next 100 tries.t b2021-11-28T18:16:06ZNDSolve not producing a smooth solution of an oscillatory function?
https://community.wolfram.com/groups/-/m/t/2414102
Why I am not getting a smooth solution, it should be a smooth oscillatory function
NDSolve[Rationalize[
SetPrecision[{y1'[x] + 4 y1[x]/x ==
0, (4 y2'[x])/x + (10^-36 x^6 y2[x] + 0.5 y1'[x]* y2'[x])/y1[x] +
y2''[x] == 0, y1[1] == 10^33, y2'[1] == 0, y2[1] == 10^8},
10]], {y1, y2}, {x, 10^0, 10^15},
Method -> {"Chasing", "ExtraPrecision" -> 10,
"ChasingType" -> "NonlinearChasing"}, MaxSteps -> 10000000]John Wick2021-11-26T18:51:26ZProblem with DSolve, piecewise and constants of integration
https://community.wolfram.com/groups/-/m/t/2414811
I'm trying to use DSolve with Piecewise, and I think I've found an error. The solution you get, is a Piecewise defined function, where for each piece there should be a different constant of integration.
Example:
DSolve[{x'[t] - x[t] + Piecewise[{{0, t < 1/2}, {6, t > 1/2}}] == 0},
x[t], {t, 0, 2}]
Mathematica (version 12.0.0.0) gives the following solution:
![enter image description here][1]
As you can see, both pieces share the same constant C1, where one would expect find C1 in the first one and C2 in the second one.
On the other hand, when you set initial conditions, the solution is correct, meaning that internally Mathematica uses different constants for each piece. But the solution given without them, is not mathematically correct.
This problem gets worse when you try to solve systems with several differential equations. For instance, for a system with two equations, you get wrong solutions both with and without setting initial conditions.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capturadepantalla2021-11-28alas18.22.38.png&userId=2414671Carmen Calvo2021-11-28T17:40:14Z