/r/Mathematica

Photograph via snooOG

For information and tips about Mathematica features.


related reddits:

/r/Mathematica

10,037 Subscribers

1

Setting Physical Constants

New to the software so sorry for the seemingly slow question

I’m doing some physics calculations and I do not want to have to manually enter in universal constants as custom variables all the time.

I want to use the built-in variables for these values

Is there a way to load all of the variables into the work space , similar to the “import” command in python?

The documentation tells me that these functions are already built-in, but whenever I try to call them, they don’t work for me .

Clearly I’m doing something wrong

*Answer from/u/segfault0x001

: h = Entity["PhysicalConstant", "PlanckConstant"]["Value"] is what you're looking for I think.8

5 Comments
2024/03/16
10:07 UTC

0

I have an M1 MacBook, and Mathematica will only use one core, how can I allow it to use 4?

My Mathematica notebooks are heavy and take a lot of procession power. However on the activity monitor the wolfram kernel never exceeded 100% cpu, which I think means only one core is being used. How can I allow the app to use 4 cores on the system rather than one?

4 Comments
2024/03/15
20:42 UTC

1

Help with Debugging a Mathematica Script

Establishing Radial location of tether components and moments of interia around tether CoM. Then constructing Kinetic and Potenitial energy equations

Using LaGrange Equation to Construct Equations of Motion

NDSolve to Solve system of differenatial equations for R, Theta and Psi.

Error messages from above script

Hi guys,

I'm attempting to use mathematica to solve a system of differential equations that describe the motion of an asymmetrical space tether structure in orbit and I'm encountering alot of difficulty with using the NDSolve function.

An example of the error messages given when running the code are given as well.

Any advice on where these errors arise from would be great, thanks in advance.

2 Comments
2024/03/15
17:30 UTC

0

The divisibility rules of every number from 1 to 100

NumberRule
1Any number is a multiple of 1
2The number ends in 0, 2, 4, 6 or 8
3The sum of the digits is a multiple of 3
4The 10s digit is even and the last digit is 0, 4 or 8, or the 10s digit is odd and the last digit is 2 or 6
5The number ends in 0 or 5
6The number is a multiple of 2 and 3 at the same time
7The difference between twice the last digit and the rest of the number is a multiple of 7
8The 100s digit is even and the last 2 digits are a multiple of 8 or the 100s digit is odd and the last 2 digits are 4 times an odd number
9The sum of the digits is a multiple of 9
10The number ends in 0
11The difference between the last digit and the rest of the number is a multiple of 11
12The number is a multiple of 3 and 4 at the same time
13The sum of 4 times the last digit and the rest of the number is a multiple of 13
14The number is a multiple of 2 and 7 at the same time
15The number is a multiple of 3 and 5 at the same time
16The 1,000s digit is even and the last 3 digits are a multiple of 16 or the 1,000s digit is odd and the last 3 digits are 8 times an odd number
17The difference between 5 times the last digit and the rest of the number is a multiple of 17
18The number is a multiple of 2 and 9 at the same time
19The sum of twice the last digit and the rest of the number is a multiple of 19
20The number ends in 00, 20, 40, 60 or 80
21The number is a multiple of 3 and 7 at the same time
22The number is a multiple of 2 and 11 at the same time
23The sum of 7 times the last digit and the rest of the number is a multiple of 23
24The number is a multiple of 3 and 8 at the same time
25The number ends in 00, 25, 50 or 75
26The number is a multiple of 2 and 13 at the same time
27The difference between 8 times the last digit and the rest of the number is a multiple of 27
28The number is a multiple of 4 and 7 at the same time
29The sum of thrice the last digit and the rest of the number is a multiple of 29
30The number is a multiple of 3 and 10 at the same time
31The difference between thrice the last digit and the rest of the number is a multiple of 31
32The 10,000s digit is even and the last 4 digits are a multiple of 32 or the 10,000s digit is odd and the last 4 digits are 16 times an odd number
33The number is a multiple of 3 and 11 at the same time
34The number is a multiple of 2 and 17 at the same time
35The number is a multiple of 5 and 7 at the same time
36The number is a multiple of 4 and 9 at the same time
37The difference between 11 times the last digit and the rest of the number is a multiple of 37
38The number is a multiple of 2 and 19 at the same time
39The number is a multiple of 3 and 13 at the same time
40The 100s digit is even and the last 2 digits are 00, 40 or 80, or the 100s digit is odd and the last 2 digits are 20 or 60
41The difference between 4 times the last digit and the rest of the number is a multiple of 41
42The number is a multiple of 2, 3 and 7 at the same time
43The sum of 13 times the last digit and the rest of the number is a multiple of 43
44The number is a multiple of 4 and 11 at the same time
45The number is a multiple of 5 and 9 at the same time
46The number is a multiple of 2 and 23 at the same time
47The difference between 14 times the last digit and the rest of the number is a multiple of 47
48The number is a multiple of 3 and 16 at the same time
49The sum of 5 times the last digit and the rest of the number is a multiple of 49
50The number ends in 00 or 50
51The number is a multiple of 3 and 17 at the same time
52The number is a multiple of 4 and 13 at the same time
53The sum of 16 times the last digit and the rest of the number is a multiple of 53
54The number is a multiple of 2 and 27 at the same time
55The number is a multiple of 5 and 11 at the same time
56The number is a multiple of 7 and 8 at the same time
57The number is a multiple of 3 and 19 at the same time
58The number is a multiple of 2 and 29 at the same time
59The sum of 6 times the last digit and the rest of the number is a multiple of 59
60The number is a multiple of 3 and 20 at the same time
61The difference between 6 times the last digit and the rest of the number is a multiple of 61
62The number is a multiple of 2 and 31 at the same time
63The number is a multiple of 7 and 9 at the same time
64The 100,000s digit is even and the last 5 digits are a multiple of 64 or the 100,000s digit is odd and the last 5 digits are 32 times an odd number
65The number is a multiple of 5 and 13 at the same time
66The number is a multiple of 2, 3 and 11 at the same time
67The difference between 20 times the last digit and the rest of the number is a multiple of 67
68The number is a multiple of 4 and 17 at the same time
69The number is a multiple of 3 and 23 at the same time
70The number is a multiple of 7 and 10 at the same time
71The difference between 7 times the last digit and the rest of the number is a multiple of 71
72The number is a multiple of 8 and 9 at the same time
73The sum of 22 times the last digit and the rest of the number is a multiple of 73
74The number is a multiple of 2 and 37 at the same time
75The number is a multiple of 3 and 25 at the same time
76The number is a multiple of 4 and 19 at the same time
77The number is a multiple of 7 and 11 at the same time
78The number is a multiple of 2, 3 and 13 at the same time
79The sum of 8 times the last digit and the rest of the number is a multiple of 79
80The 1,000s digit is even and the last 3 digits are a multiple of 80 or the 1,000s digit is odd and the last 3 digits are 40 times an odd number
81The difference between 8 times the last digit and the rest of the number is a multiple of 81
82The number is a multiple of 2 and 41 at the same time
83The sum of 25 times the last digit and the rest of the number is a multiple of 83
84The number is a multiple of 3, 4 and 7 at the same time
85The number is a multiple of 5 and 17 at the same time
86The number is a multiple of 2 and 43 at the same time
87The number is a multiple of 3 and 29 at the same time
88The number is a multiple of 8 and 11 at the same time
89The sum of 9 times the last digit and the rest of the number is a multiple of 89
90The number is a multiple of 9 and 10 at the same time
91The number is a multiple of 7 and 13 at the same time
92The number is a multiple of 4 and 23 at the same time
93The number is a multiple of 3 and 31 at the same time
94The number is a multiple of 2 and 47 at the same time
95The number is a multiple of 5 and 19 at the same time
96The number is a multiple of 3 and 32 at the same time
97The difference between 29 times the last digit and the rest of the number is a multiple of 97
98The number is a multiple of 2 and 49 at the same time
99The number is a multiple of 9 and 11 at the same time
100The number ends in 00

2 Comments
2024/03/15
16:50 UTC

0

Mastering the Art of End-of-Semester Exams: 10 Strategies for Success

0 Comments
2024/03/15
13:41 UTC

3

Looking for fast mex code

The mex of a set is the smallest nonnegative integer not in the set.

I have sorted lists with a half million integers, and my code for the mex (MemberQ inside a whole loop) is the slowest part of my computation. Any suggestions for a faster way to do this?

Mex[A_List] := Module[{k = 0}, While[MemberQ[A, k], k++]; k]
15 Comments
2024/03/12
23:06 UTC

0

Transforming Fast Food into Study Hacks

0 Comments
2024/03/12
13:13 UTC

0

Mathematica Bound Reference

Im in year 10 rn doing Methods 1 and 2. i was wondering if anyone has an online bound reference for Mathematic with all the formulas relevent for Mathematica Methods. If anyone does, it would be great help for me. Thanksss

7 Comments
2024/03/10
06:13 UTC

1

Mastering the Art of Note-Taking: From Lecture Doodles to A+ Grades

0 Comments
2024/03/06
13:20 UTC

3

Mathematica can't recover unsaved work.

How many people have run into the Mathematica bug that results in loosing work - if Mathematica or your computer crashes (e.g. you loose power), then you loose all your work without the possibility of recovery. There is simply nothing to recover apparently if you have not saved manually at least once. Even if you have "Autosave" turned on it will not save anything until you manually save the first time. I just lost many hours of work a couple of weeks ago in evaluating the newest version 14 release.

I think this bug/feature has been around for as long as Mathematica has - at least since I first used it with version 5&6 almost 20 years ago. I don't use Mathematica very often and had simply forgotten about this problem, and then after many, many hours of working on something - boom - lost power in part of the house and all that effort was now simply gone - like a puff of smoke in the wind.

My bad of course, but I can't honestly imagine why Wolfram has not addressed this sort of problem years ago. There are plenty of apps today (on macOS - I don't use Windows any longer) where this sort of problem is no big deal - from the simple Notes.app to Photoshop.app to many, many others.

Is there some underlying fundamental issue that prevents this bug from being addressed without some major redesign in Mathematica? From my limited research, the issue seems to be there is simply no file created when you click on the "File/New/Notebook" menu option - you get a window with a name of "Untitled-1" and I'm guessing it's just an in-memory data structure and does not get committed to the filesystem until you click on the "File/Save" menu item.

Please add your voice to this poll so we can see how many people have experienced or not experienced this problem and get an idea of how many hours of work has been lost as a result of this bug.

Thanks very much for your input.

View Poll

22 Comments
2024/03/01
19:15 UTC

1

How do I differentiate this in Mathematica?

https://preview.redd.it/2iq9b0lsahlc1.png?width=464&format=png&auto=webp&s=f9af7525497ed67fdefac4c8829e30bc92ea4c38

I need to find dv/dt, given that d(theta)/dt = omega and d(omega)/dt is alpha. I need the entire proccess with steps. How do I do this in Mathematica?

(l and r are constants)

5 Comments
2024/02/29
07:41 UTC

0

How do I differentiate this in Mathematica?

https://preview.redd.it/2iq9b0lsahlc1.png?width=464&format=png&auto=webp&s=f9af7525497ed67fdefac4c8829e30bc92ea4c38

I need to find dv/dt, given that d(theta)/dt = omega and d(omega)/dt is alpha. I need the entire proccess with steps. How do I do this in Mathematica?

(l and r are constants)

1 Comment
2024/02/29
07:41 UTC

1

Linear regression with data errors

Hi, I try to do a linear regression but I would like to take account of the error in my measurements. Does someone have an idea of how to do it?

Ps: I already tried with Around but it didn't work

3 Comments
2024/02/28
22:11 UTC

3

Zero Knowledge Authentication

Hello everyone!

There is a livestream on Zero Knowledge Authentication by Armando Benjamín Cruz Hinojosa on YouTube!

https://preview.redd.it/di1l8e5vtclc1.png?width=2180&format=png&auto=webp&s=69c5097368ad9a97598e7e54bde43b3a0fe677f5

0 Comments
2024/02/28
16:39 UTC

0

Juggling deadlines, lectures, and a social life? Top 13 Easy-to-Use Apps Every Student Must Have in 2024

0 Comments
2024/02/28
14:06 UTC

0

Integral Calculus Help

1 Comment
2024/02/23
08:52 UTC

8 Comments
2024/02/21
01:24 UTC

2

Scraping High-Res images from the MoMA using Mathematica

Hey, I'm new to Mathematica with no prior experience. I wanted to download pictures from the MOMA website and found a Mathematica code in this forum: [https://mathematica.stackexchange.com/questions/91982/scraping-high-res-images-from-the-moma-and-the-van-gogh-museum-websites]. I tried running the code, but I couldn't get it to work. The picture I want to download is from this link: [https://www.moma.org/collection/works/82343].

Can anyone help me figure out what I need to do to make it work and how? For example, what changes do I need to make in the code for each picture? I would really appreciate your help!

https://preview.redd.it/asrm5iyygkjc1.png?width=1302&format=png&auto=webp&s=dda1625ca9e38fad88c1272c29cc3655d859ded5

1 Comment
2024/02/19
16:13 UTC

2

Why does <<ANOVA` not work, but Needs["Anova`] and << EquationTrekker` do work

The Get (<<) documentation seems to only be about importing files, yet somehow << EquationTrekker` seems to be importing a context?

Also confused why neither Needs["Algebra`"] nor <<Algebra` work.

0 Comments
2024/02/19
08:08 UTC

1

Monte Carlo demo notebook conversion via LLMs and parsers

0 Comments
2024/02/18
20:24 UTC

1

Mathematic Error

Hey everyone! I am in a Differential Equations class and we are working on an assignment using Mathematica. I have been running into a few issues with it when trying to use the DSolve. I am to solve the inital value problem { (dh/dt) = −0.25h^2 + 1.25h − 1.3125, h(0) = 0.5 When I go to compute it I keep getting errors regarding 0.25 not being a valid variable. If anyone could help that would be great. I have attached an image of the error.

https://preview.redd.it/rvmuxpxc08jc1.png?width=746&format=png&auto=webp&s=283e03122802bf331eb8c840515d7f2b371069ef

2 Comments
2024/02/17
22:18 UTC

Back To Top