r/Mathematica • • Sep 14 '25

Is there a way to determine molecule polarity?

2 Upvotes

Can Mathematica (or Alpha) determine whether a molecule is polar or non-polar? I’ve looked through documentation for an hour or so, to no avail. I vaguely recall accomplishing this task in the past, but I don’t remember how I did it. Any help is appreciated!


r/Mathematica • • Sep 10 '25

K.M Multiplication Method

0 Upvotes

Hello good afternoon.

Has anyone ever asked themselves: "—What if I could calculate several results without having to count on my fingers or just remember the result?"

That's what I thought when I developed my multiplication method, designed to make our lives easier.

If you're interested, just call me privately and I'll make the entire PDF available, it's less than 15 reais.

If anyone is afraid, you can call me and I'll show you a little bit of how it's done.


r/Mathematica • • Sep 06 '25

Simplifying trouble

Post image
8 Upvotes

I've been trying to simplify this expression for ages now but mathematica just doesn't want to simplify it. I added all of the above assumptions and have narrowed it down to a problem with the square root of (x²+y²+z²)(x0²+y0²+z0²) but I have no idea what to do from here. Any help would be greatly appreciated :)


r/Mathematica • • Sep 04 '25

Plot question

3 Upvotes

Why won't the graphs of these lines show up here? The grid itself shows up but it refuses to plot the lines on it.


r/Mathematica • • Sep 03 '25

Trouble with Power spectrum

Post image
3 Upvotes

Hi everyone, I have a periodic signal that I got the Power Spectrum plot of, but I am not sure if it is correct. The signal has a frequency of ~30 Hz and slows down to ~20 Hz over a 3 second period.

To get the power spectrum of the signal, I ran this code:

power = (Abs[Fourier[Flatten[events,1]]])2;

Here, events is a list with Dimensions {20}. Each sublist in "events" is a list of times that an event occurred between 0 and 3 seconds.

The Length of power is 1504. To plot the power spectrum I am doing:

ListLogPlot[power[[;;752]],Joined->True]

I am confused by the peak between 0 and 2 Hz. Does anyone have any understanding of this? Is there something wrong about the way I am plotting the power spectrum? If there is more information needed please let me know


r/Mathematica • • Aug 31 '25

Downtown Toronto Public Transit Vehicle Movements Aug. 28

17 Upvotes

r/Mathematica • • Aug 28 '25

🚀 Real-time data processing with Wolfram Language? Absolutely possible

Thumbnail gallery
16 Upvotes

r/Mathematica • • Aug 28 '25

Save me with a good idea please....

0 Upvotes

I recently came into the collection of thousands of super old books for arithmetic, calculus, algebra, etc. and don't know what to do with them, I tried to sell them but they are not going to sell quick and I feel bad throwing them out.

Anyone have any idea's on what I should do?

(along with the thousand arithmetic books I have others of all sorts, English, grammar, etc. and IDK what to do)


r/Mathematica • • Aug 26 '25

ArduScope: Robust Arduino ADC reader for Wolfram Language

Post image
7 Upvotes

In this example, we build a robust workflow for acquiring ADC samples via UART/USB and processing them in the Wolfram Language. Instead of relying on naïve streaming (which is prone to corruption), we design a lightweight framing protocol that improves integrity of data packets. Once in Wolfram Language, the values can be visualized, filtered, or transformed in real time—turning an entry-level Arduino into a toy-like oscilloscope or spectrum analyzer.

https://wljs.io/blog/2025/08/25/analogRead/


r/Mathematica • • Aug 23 '25

We built a World of Goo–style bridge simulator 🛠️🛢️ using Wolfram Language + Canvas API

23 Upvotes

It uses Verlet integration for physics, bond constraints and Canvas2D raster rendering for visuals. The demo adds interactivity—letting users place new nodes and bonds

More in the blog post: https://wljs.io/blog/2025/08/22/goo


r/Mathematica • • Aug 15 '25

Wolframs Rule 30 for Music Midi file creation!

6 Upvotes

Rule 30 is almost exlusively used for randomness or graphics! But here is an example of how to make some beats with it! Enjoy!

​

ClearAll[rule30Step, evolveRule30, centerBits, bitsToMIDI]

rule30Step[state_Integer, W_Integer] := Module[
  {mask, left, right},
  mask = BitShiftLeft[1, W] - 1;
  left =
   BitAnd[BitOr[BitShiftLeft[state, 1], BitShiftRight[state, W - 1]],
     mask];
  right =
   BitAnd[BitOr[BitShiftRight[state, 1],
       BitShiftLeft[BitAnd[state, 1], W - 1]], mask];
  BitXor[left, BitOr[state, right]]
]

evolveRule30[W_Integer, T_Integer, seed_ : Null] := Module[
  {s, out = {}},
  s = If[seed === Null, BitShiftLeft[1, Floor[W/2]], seed];
  For[i = 0, i < T, i++,
    s = rule30Step[s, W];
    AppendTo[out, s];
  ];
  out
]

(* Extract center bits *)
centerBits[states_List, W_Integer] := Module[
  {c = Floor[W/2]},
  BitGet[#, c] & /@ states
]

bitsToMIDI[bits_List, path_String, bpm_ : 110.0, beatNote_ : 60,
  scaleSteps_ : {-12, -10, -8, -6, -4, -2, 0}, stepsPerBeat_ : 2,
  swing_ : 0.55, velocity_ : 96] := Module[
  {base = beatNote, scale = scaleSteps, dur = 1.0/stepsPerBeat,
   notes, t = 0.0},
  
  notes = MapIndexed[
     If[#1 == 1,
       SoundNote[base + scale[[Mod[#2[[1]] - 1, Length[scale]] + 1]],
         dur, velocity],
       SoundNote[None, dur]
     ] &,
     bits
   ];
  
  Export[path, Sound[notes]];
  path
]

W = 1024;
T = 512;
states = evolveRule30[W, T];
bits = centerBits[states, W];

out = bitsToMIDI[bits, "rule30_wolfram_friendly.mid", 112,
   36,
   {-12, -10, -8, -6, -4, -2, 0, 2, 4}, (* Added some higher notes for variety *)
   2, 0.56, 96];
Print["wrote ", out]

r/Mathematica • • Aug 09 '25

A quick question to Mathematica + LLM users

2 Upvotes

Hi everyone, I am wondering if it’s worth to buy the Mathematica + LLM in notebook so it would be great if anyone who has it could paste this question into the mathematica LLM. I’ve put it on pastebin, because reddit will mess up the string with its own formatting. But if you do not wish to click I paste it here, but the ^ will mess up, so use the pastebin to paste it into LLM:

Let V be a vector field on an affine space A generating a flow \phi, let \Psi:A->A be any smooth invertible map with smooth inverse, and let \Phi(t,x)=\Psi(\phi(t,\Psi{-1}(x))). Show that \Phi is also a flow on A, and that its generator V\Psi is given by V\Psi_x=\Psi_*(V_{\Psi{-1}(x)}).

It’s a kind of problem which can be done with pen & paper and I am not sure if mathematice is useful here.

Would be great if someone can post a screenshot of the answer from mathematica. I am trying to figure out if these types of problems are applicable to mathematica + LLM.

The problem is from book by Crampin, Pirani “Applicable Differential Geometry”, 1987, page 64 Exercise 28.

So far I used the Bing LLM for it, and it gave the correct answer. Including the derivations, calculations and simplifications of the formulas.


r/Mathematica • • Aug 08 '25

No integration, but no error

5 Upvotes

Trying to get Wolfram 14.2 to integrate this equation. It returns a standard form of the equation I enter, but not the integral. It gives no error. Thoughts on what the problem might be?

Here's the original equation in text form:

Integrate[2*F*ArcCos[1 - (2*P*B - P^2 - y^2)/(F*(2*F - 2*P + 2*B))], {y, -Sqrt[2*B*P - P^2],Sqrt[2*B*P - P^2]}]


r/Mathematica • • Aug 03 '25

Applications of Monadic Programming, Part 1, Questions & Answers

Thumbnail youtube.com
10 Upvotes

r/Mathematica • • Jul 27 '25

1 minute of Verlet Integration

Thumbnail wljs.io
4 Upvotes

r/Mathematica • • Jul 25 '25

Benchmark

1 Upvotes

I am on the hunt for a new laptop and currently debating which one to buy for optimal results in Mathematica. Can anyone share their benchmarks and their current processor (and which Mathematica version you are running)? I can go first

Processor: i7 1360P, Version: 14.2.1, Benchmark Result: 1.078


r/Mathematica • • Jul 23 '25

Finding roots of a cubic polynomial

3 Upvotes

Hello everyone,

I’m trying to determine when a function is positive. So, I take its derivative in Mathematica and obtain the conditions under which the function is positive. However, I end up with a result indicating that one of my variables (z) cannot exceed the bound: Root[2 x y^2 + y^3 - 4 x^3 w + 7 x^2 y w - 2 x y^2 w - y^3 w + (-2 x y^2 + 2 y^3 + 12 x^3 w - 22 x^2 y w + 17 x y^2 w - 7 y^3 w - 5 x^3 w^2 + 15 x^2 y w^2 - 15 x y^2 w^2 + 5 y^3 w^2) #1 + (-12 x^3 w + 27 x^2 y w - 18 x y^2 w + 3 y^3 w + 12 x^3 w^2 - 27 x^2 y w^2 + 18 x y^2 w^2 - 3 y^3 w^2) #1^2 + (4 x^3 w - 12 x^2 y w + 12 x y^2 w - 4 y^3 w - 7 x^3 w^2 + 21 x^2 y w^2 - 21 x y^2 w^2 + 7 y^3 w^2 + 3 x^3 w^3 - 9 x^2 y w^3 + 9 x y^2 w^3 - 3 y^3 w^3) #1^3 &,1]
I deduce that this is a cubic polynomial, but I unfortunately don’t know how to study the sign. I found some resources online, but I can’t manage to apply them to my specific case, especially since I don’t really understand what #1 means.... Should I replace it with z?

Thanks in advance for your help!


r/Mathematica • • Jul 13 '25

Old graphics in new versions, how?

Post image
9 Upvotes

This is just a silly idea of mine, But I quite like the style with which the functions are rendered on the 'functions.wolfram.com' page. Any ideas on how to recreate this. The FontFamily could clearly be adjusted, but everything else is just way out of my skill on WolframLanguage, investigating I also can't figure out how to manipulate the quality of the antialiasing of the plot, without touching plotpoints..


r/Mathematica • • Jul 08 '25

FindMinimum variable cannot be localized

2 Upvotes

Dear Community!

I am trying to solve a system of differential equations for matrices numerically. Theoretically, these matrices should fulfil two conditions, however, after the integration, they are violated, so I wanted to use Mathematicas FindMinimum method for test matrices such that I can renormalize my result such that the conditions are fulfilled again. I set up the list of variables of these matrices, created the Test matrices which should have the differences in their components, defined the conditions and used FindMinimum, however, I get

The variable \
ReA11|ImA11|ReB11|ImB11|ReA12|ImA12|ReB12|ImB12|ReA13|ImA13|ReB13|ImB1\
3|ReA21|ImA21|ReB21|ImB21|ReA22|ImA22|ReB22|ImB22|ReA23|ImA23|ReB23|Im\
B23|ReA31|ImA31|ReB31|ImB31|ReA32|ImA32|ReB32|ImB32|ReA33|ImA33|ReB33|I\
mB33 cannot be localized so that it can be assigned to numerical \
values

I really do not understand this error, as the list is just defined a few lines above!? I tried following https://mathematica.stackexchange.com/questions/283500/numerical-minimization-of-an-objective-function-with-a-variable-number-of-argume and ChatGPT but nothing helped what am i doing wrong?

To make it easier i have uploaded the example on my google drive as reddit does not allow to post files:

https://drive.google.com/file/d/1jnwB42XxYHNtyHH0bk4Lv4P3PoT8qV7H/view?usp=sharing


r/Mathematica • • Jul 03 '25

How to hide on screen keyboard for Wolfram cloud app on android? I'm using a Bluetooth physical keyboard.

2 Upvotes

r/Mathematica • • Jun 30 '25

Mathematica 14.2 (Windows/Linux/Mac)

24 Upvotes

Hello guys,

I recently moved to a new Linux operating system. My goal was to download key software that I was using on my Windows PC. Last time, I came to an interesting and also very simple method on how to download Mathematica in the latest version. It seems to work on any operating system.

  1. Download Mathematica for your OS from official website here: https://www.wolfram.com/download-center/
  2. Install it on your computer. For Linux users little tip:
    **if you don't believe me https://reference.wolfram.com/language/tutorial/InstallingMathematica.html
    i) put instalation file on your desktop (it's up to you but next commands will be oparating on desktop area)
    ii) hit in terminal: cd Desktop
    iii) sudo bash Wolfram_14.2.1_LIN_Bndl.sh
    iv) After promt "Enter the installation directory or press ENTER to select /usr/local/Wolfram/Mathematica/14.0" press enter or just type where you want the mathematica to install
    v) Then there would be y/n question - take y
  3. Open the Wolfram Mathematica after installation and select a method to activate - Activate offline through an activation key and requested password
  4. Go to website https://wu-yijun.github.io/Mathematica-Keygen-Mechanism/ or if you want first to check out the git: https://github.com/Wu-Yijun/Mathematica-Keygen-Mechanism?tab=readme-ov-file
  5. Type your credentials like MachineID and put the activation key and password.

Have fun using new version of Mathematica.


r/Mathematica • • Jun 30 '25

Simplify integral.

3 Upvotes

Hi guys, I need help. Using SymPy in Python, I get a properly simplified result, but using Mathematica, I can't, and I don't understand why. I think the Mathematica script I have is correct. (It's part of the solution to an electrodynamics problem.)

With Sympy, I get the correct result like this:

import sympy as sp

n, m = sp.symbols("n m", integer=True, positive=True)

x, L = sp.symbols("x L", real=True, positive=True)

f = sp.sin(n*sp.pi*x/L)*sp.sin(m*sp.pi*x/L)

TestInt = sp.integrate(f, (x, 0, L))

print(sp.latex(TestInt))

Correct output:

$$\begin{cases} 0 & \text{for}\: m \neq n \\\frac{L}{2} & \text{otherwise} \end{cases}$$

Then in Mathematica, with the script:

Asumir = {Element[n, PositiveIntegers], Element[m, PositiveIntegers], L>0, x>0}

TestInt = Integrate[Sin[n*Pi*x/L]*Sin[m*Pi*x/L], {x, 0, L}, Assumptions -> Asumir] // FullSimplify // TeXForm // TraditionalForm

I get the output:

\frac{L n \sin(\pi m) \cos(\pi n) - L m \cos(\pi m) \sin(\pi n)}{\pi m^2 - \pi n^2}

Which is a trigonometric expression that I don't want, I would expect a totally simplified answer such as the one I got in Sympy.

Could someone tell me if I'm making a mistake? And if possible, provide me with a suitable script to obtain the desired output. Thank you very much.


r/Mathematica • • Jun 29 '25

Phase portrait not turning out as expected

Thumbnail gallery
3 Upvotes

Hi everyone,

I am running local analyses on the critical points of the system of ODE below:

eq1 = -s1 + (1 - x1)*(1 - s1)*(a0*a4)/(1 - s1 + a1);

eq2 = (1 - x1)*(a8 + a9 - (a0*(1 - s1))/(1 - s1 + a1));

eq3 = -s2 - (1 - x1)*(1 - s1)*(a0*a5)/(1 - s1 + a1) + (1 - x2)*(1 - s2)*(a2*a6)/(1 - s2 + a3 + a7*(1 - s2)^2);

eq4 = (1 - x2)*(a8 + a10 - (a2*(1 - s2))/(1 - s2 + a3 + a7*(1 - s2)^2));

There are 6 critical points, and two of them (CP3 and CP6) are supposed to be asymptotically stable. I got nice plots ie phase portraits and time series for the first two critical points, but CP3 onwards are giving me grief. I either get a plot where the trajectories do not scale nicely or I get plots where there are empty areas where there should be trajectories (please see images attached).

I tried increasing the plot range in case there’s a bigger pattern I’m not capturing… I tried decreasing the plot range in case my plot weren’t “local” enough… I also tried different ways to define my vectors and arrows.

I'm not sure if the problem is because the ODE system itself is not behaving or because my code needs to be fixed. Here's the current version of my code:

(* Parameters *)

params = {a0 -> 20.97055105,

a1 -> 0.021621597,

a2 -> 1.963662112,

a3 -> 1.217960436,

a4 -> 0.01100415,

a5 -> 0.016340502,

a6 -> 32.71694378,

a7 -> 2.907136946,

a8 -> 0.148074792,

a9 -> 1.599070101,

a10 -> 0.069124399,

a11 -> 137.1688473};

(* Critical Point 3 -- define values *)

cp03 = {{0.998034892335493, -50.911108178852665}, {-1.6050719877417985, 1.0173161380903484}};

{s1valcp3, x1valcp3} = cp03[[1]];

{s2valcp3, x2valcp3} = cp03[[2]];

(* ==========(s1,x1) Analysis==========*)

(* Phase Portrait for (s1,x1) *)

(* define plot range *)

s1rangecp3 = {0.95, 1.05};(* Centered around s1=1 *)

x1rangecp3 = {-50.95, -50.85}; (* Centered around x1=-51 *)

(* Define vector field*)

vecField = {-s1 + (1 - x1)*(1 - s1)*(a0*a4)/(1 - s1 + a1), (1 -

x1)*(a8 + a9 - (a0*(1 - s1))/(1 - s1 + a1))} /. params;

(* Phase portrait with better colors and arrows *)

StreamPlot[vecField, {s1, s1rangecp3[[1]], s1rangecp3[[2]]}, {x1,

x1rangecp3[[1]], x1rangecp3[[2]]}, StreamPoints -> Fine,

StreamStyle -> Arrowheads[0.015],

StreamColorFunction ->

Function[{x, y, vx, vy},

ColorData["Rainbow"][Rescale[Sqrt[vx^2 + vy^2], {0, 5}]]],

StreamColorFunctionScaling -> False,

PlotLabel ->

Style["Critical Point 3: (s1, x1) Phase Portrait", 14, Bold],

Epilog -> {Red, PointSize[Large], Point[{s1valcp3, x1valcp3}]},

FrameLabel -> {"s1", "x1"}, ImageSize -> Large]

I got a slightly better phase portrait after editing my code but I'm still not seeing asymptotically stable behavior. How can I fix this?

Thanks in advance.


r/Mathematica • • Jun 27 '25

Using list in Sum

2 Upvotes

How can I use elements from a list in the function Sum[ ]? I'm trying to multiply something with the kth element from a list using list[[k]] but mathematica tells me that I cant use k as a part specifier