/r/Mathematica
For information and tips about Mathematica features.
related reddits:
/r/Mathematica
So i installed wolfram mathematica in my pc, licensed through my university. After some days i realized it would be much more handy to have that software in my laptop. So my question is fairly simple. Can i unistall the one in my pc and then install in my laptop?
I'm a freshmen student in physics and I have to do a project in mathematica of a certain level of difficulty. While I don't have great knowledge about biology, I'm interested in ProteinData because it looks cool. Any ideas about how I do a cool project about it?
Snapdragon X Elite
Is there any possibility to use mathematica on snapdragon chips as my university recommended snapdragon laptops and we need mathematica for our masterthesis.
Kind regards Your Wilfram appreciator
I have a following function and want to calculate its one sided Limit in x->1.
The left-sided output is totally fine, but I'm wondering why do I get -Infinity on right-sided Limit since it does not exist.
I also plotted the function and printed its domain using built-in function and all checks out with my understanding. So we do I get -inf output? What am I missing here?
Can someone give some examples of differential equations on perturbation method using mathematica. I'm new to Mathematica and I'm sot sure if I can use it to solve them or how to use it.
V[x_] = (1 - Exp[-Sqrt[2/3]*x])^(2);
drV[x_] = D[V, x];
Solve[-drV/V == -Sqrt[2], x];
phif = 0.940;
X = (1 + (2 - a)*phi/(2 Sqrt[3 b]))^(2/(2 - a));
M[phi_] = -Sqrt[b/3] (X^a (a + 6 X) - 3 b*X)/(X^(1 + a/2)*(2 X^a - b));
drM[phi_] = D[M[phi], phi];
Mf[a_, b_] := M[phif] == V[phif];
drMf[a_, b_] := drM[phif] == drV[phif];
Solve[{Mf[a, b], drMf[a, b]}, {a, b}]
Processing img c28obgpgex1e1...
dbgbb!(...) makes it easy to debug array data using notebooks just like the dbg!(...) macro. It sends the data to the BulletinBoard server, and then it can be read from Mathematica/Jupyter notebooks
BulletinBoard is an in-memory object storage that mediates data between a Rust program and a notebook. The BulletinBoard server is available on crates.io, DockerHub, and GitHub. There is also a GUI application that acts as both client and server.
Data is stored as ArrayObjects, which is a self-describing binary data format optimized for array data and for object storage.
Check it out and enjoy the accelerated coding experience!
https://github.com/YShoji-HEP/dbgbb
Here is the code generated taking help of an AI tool (ChatGPT):
Count[WordList[], StringMatchQ[#, "q" ~~ ___] &]
There is definitely something wrong as the output should not be zero.
The syntax StringMatchQ[#, "q" ~~ ___] & is something I find difficult to relate. It will help if someone could explain the relevance of #, ~~ ___, & within the code. Of course since the code is apparently giving wrong output, first need to revive the correct code.
Thanks in advance!
On running TextSentences[x], it will help if anyone can explain how the Wolfram Languages infers for example "Resrly" is not the first word of a new sentence.
StringLength[MaximalBy[WordList[],StringLength]]
Not sure why the output is in list form. Obviously there should be a way to convert this list form into integer form.
The problem is to make a string from the first letters of all the sentences in the Wikipedia article about computers.
Here is my tentative code:
StringJoin[StringTake[StringSplit[WikipediaData["computers"],"."], 2]]
Not sure about the error messages shown in red above.
I chose 2 instead of 1 for StringTake argument as there seems to be a whitespace after period.
Help is sought also for how to ensure that the first letter after a sentence is selected irrespective of it appears after the period or followed by one or more whitespaces.
StringSplit[stringsample,{"."}][[ 1]]
The double square bracket syntax appears not that intuitive with otherwise the usual way which is putting one function above the other.
If I understand correctly, the output of StringSplit function which is a list is being used by [[1]] to show just the first element of the list. What appears strange is the syntax.
The goal is to by using StringSplit, split the text on the basis of comma appearance.
StringSplit["Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",","]
The above syntax generated after referring to Wolfram docs on StringSplit:
It seems the comma is indeed split but difficult to discern from the output. So trying to take help of InputForm function in order to show each substring with quotes.
The docs uses InputForm[%] as second code after the StringSplit code. Not sure how the second code using InputForm function will know that it is the previous code of which referred.
I tried to do the same with my code and here is the screenshot:
How can I solve this problem? When I try to click to select, I cannot select it. When I click on the details, I see the license (free trial account). My university provides a code, so I want to use it, but there is no place to enter my code. I uninstalled and reinstalled Mathematica, but I still couldn’t solve the issue.
StringPosition[WikipediaData["Strings"],"."]
The aim is to find the positions where the periods occur in the article. The output is strange with only 3 results.
For finding how many words are there in the Wikipedia article "Computer", after running the below code, getting 9358 (instead of 9239):
Length[StringSplit[WikipediaData["computer"]]]
If I am correct, StringSplit counts each word based on the number of times it encounters white space while parsing through the whole string. So even if there are punctuation marks like commas, that should not affect the count of words.
This is a question in exercises part of Strings & Text (An Elementary Introduction to the Wolfram Language).
Not sure what it means by Wikipedia and 'computer' in this context. Is WikipediaData function designed so as to access the content of wikipedia.org?
Also what it exactly means by Wikipedia article for 'coimputer'. Will it refer to this url page: https://en.wikipedia.org/wiki/Computer?
BarChart[StringLength[StringSplit["A long time ago, in a galaxy far,far away", ","]]]
While I can follow the reason for three bars as there are 2 commas in the string, unable to grasp the reason why first unit in the x axis left empty (or with zero value).
I have an equation that i need to solve but Mathematica only outputs empty brackets
di = 0.1;
dRI = 0.11;
da = dIA + 0.01;
ai = 1000;
lR = 47;
lI = 0.08;
lA = 220;
aa = 15;
ka = 0.5299;
eq = 1/ka ==
da/di*ai + da/2*lR*Log[dRI/di] + da/2*lI*Log[dIA/dRI] +
da/2*lA*Log[da/dIA] + 1/aa
Solve[eq, dIA]
Ouput:
1.88715 ==
1/15 + 10002.2 (0.01 + dIA) + 0.04 (0.01 + dIA) Log[9.09091 dIA] +
110 (0.01 + dIA) Log[(0.01 + dIA)/dIA]
{}
I asked ChatGPT but that didnt help. What am I doing wrong?
Hello!
I am about to buy a new laptop and I would like some advice in terms of which specs I should focus on, given that my main usage for work is Mathematica (plus all the usual stuff, email, web, etc). Since Mathematica can be used in many ways and for different purposes here some details for my use case.
I am a theoretical physicist and I use Mathematica constantly everyday. 90% of what I do is symbolic calculations that involve a huge amounts of terms. I usually reduce most of operations to basic ones, in order to speed things up. A typical example (for those among you that do a similar job) is calculation of many Feynman diagrams, which in principle are integrals but can be easily reduced to algebraic operations and the most time-consuming part is the simplification of terms (typically hundreds of thousands). By simplifications I mean applying some rules to substitute terms so they sum up and simplify.
Another example in my daily usage are perturbative expansions. In many situations I have to derive some expressions which are functions of quantities that are power series and then derive the power series of the result.
Less often I do numerical calculations or graphics (but I do them). I also sometimes do some numerical scans.
Please, also consider that, besides the heavy usage of Mathematica, I use other coding language like FORM. Also, I don't do any graphic design or video editing, but I am considering some online teaching, so a good camera and screen-sharing fluidity is important (also important when giving online seminars or work meetings). Finally, as a pure hobby, I also make some ambient music using ableton live :).
Since the new macbook pro with the M4 chips are out, and they seem a huge upgrade, I am considering buying one.
But there are many different specs and many golden coins involved.
What would be the most important aspect(s) to look at? I have zero knowledge on which Mathematica functionality uses which laptop's feature. I can only note that, when Mathematica takes long time and the fans are on, CPU is 100%, while RAM is mostly fine. So, should I focus more on number of cores rather than ram (which anyway should be 16GB, at least)?
Just to keep it in context with the laptop I am looking at, there is a huge jump in performance from the M4 [16 GB of ram, 512 ssd, 10 core (4+6)] and the M4 pro [24 GB of ram, 512 ssd, 12 core (8+4)], but I am not sure if it is worth for my usage.
At the moment I have a Lenovo yoga slim 7 from 2020 with Ubuntu. At that time I switched from Windows to Ubuntu simply because I couldn't stand Windows anymore and I have zero regrets ;). However, I am not really a typical Linux user and the fact that I need to access the terminal for any tiny thing is frustrating (still less than using Windows...). This is why I am thinking of switching to macOS which may be the right half-way between dumb Windows and Linux.
A final note, the Macbooks mentioned above are the devices that I am considering now but your answers do not need to be specifically on those models (although any advice is welcome), it was just for context.
Thanks and cheers!
Hello, I'm going to present a Calculus 2 seminar on Fubini's Theorem and I need to solve contextualized situations in the area of Engineering that involve this topic. Could anyone help me with 3 practical examples, applied to Engineering, using Fubini's Theorem, with detailed resolution? Thank you very much for the help!
f[x_Integer] := x + 108
h[x_Integer] :=x + 77
SetAttributes[f, Listable]
f[x_List] := h/@x
f[{44,444}]
Given I have referred h function here: f[x_List] := h/@x , I expected the output of f[{44,444}] to be 121 (77 + 44) and 521 (77 + 444). So my query is how even after inclusion of h, the output of list still referring to f. Is it then wrong to code:
f[x_List] := h/@x
And what is the implication or utility of mentioning h (as part h/@x) when anyway it will be g/@x.
Continuing with my earlier post Difference between prefix and map and why they produce the same output in this code, it will hep if someone can clarify the difference between these 3 codes giving the same output:
The first one is the most intuitive and this is the way till now I have been using functions most of the time:
StringLength[StringSplit["A long time ago, in a galaxy far, far away", {",", " "}]]
If I understand correctly, the second one and third ones are giving the same output as StringLength function has listable attribute added by default.
StringLength@StringSplit["A long time ago, in a galaxy far, far away", {",", " "}]
StringLength/@StringSplit["A long time ago, in a galaxy far, far away", {",", " "}]
If listable attribute were not added by default to the StringLength function, then mapping was needed (by using /@).
This now brings the need to use prefix (by using @) when even without the use of prefix, there is the same output as in the first code.
Running the two operations produces same result for these codes:
StringLength /@ StringSplit["A long time ago, in a galaxy far, far away", {",", " "}]
Output:
{1,4,4,3,0,2,1,6,3,0,3,4}
StringLength@StringSplit["A long time ago, in a galaxy far, far away", {",", " "}]
Output:
{1,4,4,3,0,2,1,6,3,0,3,4}
On further check, it appears first one performs map operation while the second one is called prefiix. Both are meant to do different things apparently.
how i found the positive inverse of x^2 +2 in mathematica? i tried using
f[x_] := x^2 + 2
Solve[y == f[x] && x >= 0, x]
but it doesnt work
BarChart[StringLength[StringSplit["A long time ago, in a galaxy far,far away"]]]
The above code seems counting ago, as a word of length 4 instead of 3 due to comma.
Requesting help for correct usage of StringSplit function that takes into account adjusting comma (or other punctuations).
ImageAdd[
Negate[EdgeDetect[Import["https://wolfr.am/EIWL-SW-Image"]]],
Import["https://wolfr.am/EIWL-SW-Image"]
]
I have a family of graphs, and I only need to see that an automorphism exists which contains a specific single vertex mapping, for example [1->96], to see that the entire graph is vertex-transitive. Is there a way to restrict the search based on this? I’ve tried somethings but nothing has run faster than just checking with VertexTransitiveGraphQ.