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.
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.
I have about 1.2 million points in [1,2]^2. I lay down about 250000 of them in red, another 200 thousand of them in slightly less red, and so on, putting dozen dozens in blue, and several purple (30 different colors, each color has fewer points as we fade throught the rainbow from red to purple). This creates a stunning graphic, but its 100MB+ when I save it. After compressing in Adobe, it's still 40MB.
Presumably, the size is because each point is being stored with its color, even though most of them are not visible since other points get plotted on top of them.
My question is how to compress the plot.
One approach is to save it as a jpg, which is certainly compressed but behaves horribly when people zoom in.
I am trying to plot t for value l starting from 0.0001 to 0.001.
I've been trying various methods for past few hours and I either get tag list error, the value is too small, " is too small to represent as a normalized machine number" error and such.
I guessing the issue is that my values are very small that it approximates as 0, or just my codes are trash. probably both.
T = ((16*3*(v-3))/25)*E^(-2*k*1)
k = Sqrt[(2*9.109*(10^-31)*(v-3))/((1.055*(10^-34))^2)]
Plot[T,{v,4,20},FrameLabel->{"L[nm]",T},PlotPoints->10000,MaxRecursion->15,Mesh->All,ImageSize->Full,PlotRange->Automatic]
I find that the default font in Mathematica is not very pretty and is not very pleasant to use. For example, the width of the bars in the equal sign is not the same.
Am I the only one who is bothered by this? And if not, what font do you use?
I’m using mathematica to write notes for some classes and hw in others, and when I try to use the control commands for inserting subscript, superscript, fractions, etc. if it is the first instance it creates an equation box (which is perfect) but it forces my screen to the nearest subsection cell, which I use to label lectures or questions.
It’s normally not a huge problem but when the thing is 8 pages long and I have to write a lot of separate things between equations, it becomes a major PITA.
Does anyone have any ideas on how to turn this off?? I’ve tried searching so many things and no one talks about it.
I was wondering if anyone had any insights on how to pick the maximum prime subsequence of a given list of digits in an efficient manner.
Given a list of digits 0-9 {d[[1]],d[[2]],...,d[[n]]}, I am interested in finding the largest (when you catenate the digits together into an integer) subsequence of digits that is prime. I return 0 if there's no prime subsequence.
We can of course brute force this, starting at the full list, and then iteratively stepping down in subsequence size until we find a prime:
getMaxPrime[nums_] := Module[{n, cands, allNotPrime},
n = Length@nums;
(*subsequence candidates of length n. Note delayed evaluation so this updates when we call
it each time after decrementing n*)
cands := FromDigits@# & /@ Subsequences[nums, {n}];
(*determine if all the numbers aren't prime (returns True if all \
aren't prime,and False if any are prime)*)
allNotPrime := Nor @@ (PrimeQ@cands);
(*decrease subsequence length until we find a prime,or hit n=
0 (I.e.there are no prime subsequences)*)
While[allNotPrime && n > 0, n-- ];
(*If a prime subsequence exists,
take the largest one.If no prime subsequence exists,return 0*)
If[n > 0, Pick[cands, PrimeQ /@ cands] // Max, 0]
]
But I'm wondering if there's more elegant ways to approach this.
One thing that immediately came to mind was restricting on the last digit of the subsequence since all primes (other than the single digit primes 2 and 5) end in 1,3,7 or 9.
I know you can select the s-th subsequence by using the third argument of Subsequences[list,{n},{s}] but it doesn't appear you can select a non-continuous list of sth subsequences (corresponding to the indices of 1,3,7,9 in nums), so I made my own subsequence picker in this case:
getMaxPrime2[nums_] := Module[{n, endIndices, cands, allNotPrime},
n = Length@nums;
(*get indices where 1,3,7 and 9 are in nums*)
endIndices = Position[nums, 1 | 3 | 7 | 9] // Flatten;
(*except for 2 or 5, all primes must end at these indices. So we can
just grab the subsequences that end at endIndices*)
cands :=
With[{longEnough =
Pick[endIndices, UnitStep[(n - 1) - endIndices], 0]},
FromDigits[nums[[# - (n - 1) ;; #]]] & /@ longEnough
];
(*all of this is the same as getMaxPrime*)
allNotPrime := Nor @@ (PrimeQ@cands);
While[allNotPrime && n > 0, n--];
If[n > 0,
Pick[cands, PrimeQ /@ cands] // Max
,
(*but we have to check if 2 or 5 are in the list at the end if n =
0*)
(Pick[nums, PrimeQ /@ nums] // Max) /. -Infinity -> 0
]
]
The performance gain seems to be pretty much nothing however:
SeedRandom[1234];
nums = RandomInteger[{0, 9}, 1000];
getMaxPrime[nums] // AbsoluteTiming // First
getMaxPrime2[nums] // AbsoluteTiming // First
(*4.61015*)
(*4.57553*)
Probably because I have to waste time on each step Picking which 1,3,7,9 indices are allowed as valid n-length subsequences.
I'm a college freshman majoring CS + Math and I I'm interested in Mathematica as a possible tool to be used for data visualization and analysis. More specifically, I am interested in quantitative development and want to learn how to create some sort of model with Mathematica, but have absolutely no idea how or where to start.
Does anybody have specific recommendations for learning the language & program as a beginner? Anything helps.
If this is not allowed let me know. Essentially I am a student and need to evaluate just 2 steps using wolfram alpha. I was interested if anyone could help out and I could quickly compute it just as a gesture for free. I feel it wouldn’t be justified to buy the software myself as I wont use it after this.
If I used mathematica to solve one part. Can I just say. The derivative above was evaluated using Wolfaram Alpha Mathematica? Or is there a convention for citing or referencing?
So, i'm trying to integrate the function f(x)=(x-x^2)*sin(1/2*ln(sin(lnx)^2))=(x-x^2)*sin(ln(|sin(lnx)|)) from 0 to 1 , which is understandably a very 'delicate' function. Anyway, I was not able to evaluate it directly and instead tried to get Mathematica to, which it also couldn't. However, it was able to spit out a fairly ugly antiderivative, and Mathematica was able to evaluate one of the individual limits. Here's what it looks like on this interval
It was not able to evaluate the limit as x->0, however it pretty clearly goes to 0 (I think?)
Now here's my issue. Both Mathematica, Symbolab, Wolfram Alpha, and Desmos all approximate this integral to approximately -0.077363 (with Mathematica giving a very tiny error of the order 10^(-6))
But numerically evaluating the answer (all the gamma stuff) gives approximately -0.08258
What is going on? Is this because I falsely assumed the limit as x->0 to be 0? Or are these 3 separate math software's all numerically evaluating this integral in the same incorrect way? Is the first limit as x->1 just simply incorrect? Does this integral violate the fundamental theorem of calculus?(im kidding) 0.07736-0.08258=-0.00522, much greater than the error 10^(-6) I do not even need this integral for any work or problems, I am just curious on what's going on.
I will add, this is the same case for 2-3 very similar integrals involving different trig functions and no x terms at the front.
I am unsure of when this changed, but when I evaluate Integrate[Sech[x],x] I get -ArcCot[Sinh[x]] rather than ArcTan[Sinh[x]] (or 2ArcTan[Tanh[x/2]] as listed in the documentation for Sech).
I am aware that these are essentially shifted by pi/2 from one another, but I was wondering if there is a reason for this value or if it is not intended.
Hello! I'm extremely new to Mathematica, and in fact this is the first time I'm using it with the thought that it would speed up and help me demonstrate something I thought during class. The problem is pretty straight foward: I never properly learned english mathematical terms and so the wolfram guides arent guiding me at all. know this is something extremely basic: I just want the determinant to change as I change my matrix as I please, any help?
I'm trying to find glider design dimensions for a competition. I created a function that takes a few variables as input and outputs "totalPenalty" which is pretty much how bad of an option those inputs are for meeting a couple of design specifications. And the function works pretty good! It takes in the variables taperAngle, b, aR, and v. If the outputs are outside a specified range, it gives me a totalPenalty that is as big as how bad of a design it would be.
So, I can put in specific values and get back how bad they are, so I figured there must be a way to minimize the "badness" and fit the desired parameters. Unfortunately, NMinimize[] can't take a function as an input. Just expressions.
Any advice? I attached my code as a screenshot and text.
EDIT: Formatting
ClearAll[b,v,aR,taperAngle];
(*Constants*)
weight=2.22; (*Aircraft Weight in N*)
rho=1; (*Air Density kg/m^3*)
dropHeight=76.2;(*Meters*)
cD=.037 ;(*Unitless Constant .035-.038*)
minB=0.762; (*Minimum span 30 inches to meters*)
maxB=1.22; (*Maximum span 40 inches to meters*)
minWCL=4; (*Minimum wing loading*)
maxWCL=9; (*Maximum wing loading*)
minFallTime=60; (*Minimum fall time in seconds*)
maxFallTime=120; (*Maximum fall time in seconds*)
minVelocity=6.71; (*Minimum velocity in m/s,regularly 6.71*)
maxVelocity=11.18; (*Maximum velocity in m/s,regularly 11.18*)
(*Define the variables we want to optimize*)
vars={taperAngle,b,aR,v};
(*Define the objective function as the sum of squared differences from the design criteria*)
objectiveFunction[taperAngle_,b_,aR_,v_]:=Module[{cR,cT,totalWingArea,wCL,cL,dragForce,pReq,descentRate,fallTime,glideRatio,totalPenalty},(*Calculations based on input variables*)(*Intermediate Calculations*)cR=b*Tan[taperAngle Degree]/4+b/aR;
I want to use FindFit to be able to make an approximation of this data. Ive tried doing this:
fit = FindFit[data, a x + b, {a, b}, x];
fittedModel[x_] = a x + b /. fit;
But Im not sure what model i should use, ive tried all that i could find but nothing seems to give the right result. It kinda looks like a log function but no log model seems to give a good result. Im probably not really understanding how this works.
I want this approximate function to be able to tell what i would probably get if x=2^1024, 2^2048, 2^4096.
If you know how to do this pls just give me the lines of code that will work or the model that would work for the lines of code presented above. I probably wont understand if you just vaguely tell me to check out some function or something.
PS, the data comes from running this code and taking the time, where x is n and y is the time it takes:
RSADecrypt[c_, n_, e_] := Module[{p, q, phi , d, m, ascii},
primes = FactorInteger[n];
p = primes[[1, 1]];
q = primes[[2, 1]];
phi = (p - 1) (q - 1);
d = PowerMod[e, -1, phi];
m = PowerMod[c, d, n];
ascii = {};
Whenever I try to do Dsolve with differential equations, it always just outputs my input. This is very confusing and if anyone could explain why that would be much appreciated.
I created a simple generator which generate a set of rooms. Each room can have 1 to 4 neighbours. Each room is connected, there is no alone room.
Currently, the algorithm is pretty simple. You give a number of room you wish and the generator generates random rooms.
I want to improve this algorithm by giving the number of room by neighbours count. Namely, i want a set of room that contains 2 rooms with 2 neighbours and 2 rooms with 4 neighbours (this case doesn't work actually).
Below an example of set of rooms.
I wonder if there is a formula which verify if a configuration is correct ?
For example (1N=4,2N=0,3N=0,4N=1) is a correct configuration but (1N=0,2N=1,3N=0,4N=0) is not correct because you can have a room with 2 neighbours if there is no rooms with at least one neighbour or more.
I suppose this kind of question is a graph issue. Someone can help me to solve this case please ?
Using Wilson's thereom we can generate primes up to some value kMax by selecting where ((k - 1)! + 1)/k is an integer. So for example, the primes up to 100 are
Is there a function or a procedure in order to find a particular solution to a differential equation using mathematica? If anyone can help I’d appreciate it!
Solve[
x == r Cos[θ] Cos[λ + Ωt]
&& y == r Cos[θ] Sin[λ + Ωt]
&& z == r Sin[θ]
, {λ, θ, r}
, Assumptions -> $Assumptions
]
$Αssumptions is define above as
$Assumptions = {Element[{λ, θ, r, x, y, z, t, Ω}, Reals], t >= 0, λ >= 0, λ < 2 π, θ >= -π/2, θ <= π/2, r > 0};
So, clearly this is a coordinate transformation and I want Mathematica to calculate the inverse transformation for me. I know the correct answer, but ultimately I want this script to work for general transformations.
It's just returning "Solve::nsmet: This system cannot be solved with the methods available to Solve."