/r/Mathematica

Photograph via snooOG

For information and tips about Mathematica features.


related reddits:

/r/Mathematica

8,922 Subscribers

2

Solving a Second Order Recurrence Relation with Non Sequential Values

Hi, I wanted to know if there's a way for mathematica to solve a second order recursion relation numerically, if I'm not specifying two sequential fixed values.

It would be something of the form r[n]=r[n-1]+r[n-2]+f([r[n-1])

Right now, I can use RecurrenceTable to numerically find values for this type of recurrence relation if I specify two sequential terms, like r[0] and r[1], but I'd like to be able to specify r[0] and r[N], and find the terms in between.

If there isn't a built in function that does this, it seems that I could have mathematica solve up the recursion relation symbolically, until it reaches the r[N] term, and then substitute that term to find the terms in between.

Does anyone know how to do this?

2 Comments
2023/09/30
13:31 UTC

1

More powerful cloud compute question

I am an avid user of wolfram cloud and at times have intensive calculations which would benefit from extensive parallelisation and/or heftier compute and memory resources.

Is it possible to rent more capacity on wolfram cloud? I have not found any way to do this. There are third party providers such as V2 but seems quite expensive.

9 Comments
2023/09/30
08:25 UTC

0

Isogenies Between Elliptic Curves: Mathematical Foundations and Cryptographic Implications

I thought there might be some people here who might be interested, so I thought I would share it.

'' This comprehensive treatise endeavors to explore the intricate mathematical tapestry woven by isogenies between elliptic curves and elucidate their profound cryptographic applications. By meticulously examining the mathematical underpinnings, including isogeny degrees, Vélu's formulas, and endomorphism rings, we forge a rigorous framework. ''

https://cogitationesmeasquas.blogspot.com/2023/09/isogenies-between-elliptic-curves.html

1 Comment
2023/09/28
00:38 UTC

3

How to find an integral Wolfram can’t do

Hello, I believe I am posting this in the correct place but I have an assignment asking me to find an integral of the form sqrt(a^2 + u^2) du that wolfram cannot do but is possible using a given form we’ve been provided. I generally find wolfram to be pretty solid so I am unsure what would make it not solve an integral.

20 Comments
2023/09/27
20:26 UTC

1

QMRITools: Processing Quantitative MRI Data

Hey everyone!

There is a livestream on QMRITools, a toolbox for quantitative analysis of magnetic resonance imaging data of muscle, nerve and heart, by Martijn Froeling on YouTube!

https://preview.redd.it/aowsew6ektqb1.png?width=1920&format=png&auto=webp&s=5282414b566b29d576a91d89a2b1990ad6dcaf1a

0 Comments
2023/09/27
15:49 UTC

1

macOS Sonoma Mathematica segmentation crashes (very frequent)

After upgrading the M1 Ultra Mac Studio to the new macOS Sonoma Wolfram Mathematica started crashing intermittently. Either the MathKernel silently dies or the Front End GUI crashes. This happens very often (every 5 ~ 10 minutes). Under macOS Ventura Mathematica was rock solid, not a single crash.

Mathematica version number: 13.3.1.0. M1 Ultra Arm64 Apple Silicon.

Edit: The following answer from the Wolfram reseller help desk seems to have fixed the problem:

Thank you for your inquiry. I upgraded our M2 MacBook to macOS Sonoma
and there seems to be no problem.
To resolve common Mathematica problems, please try performing the
following clean start and configuration file reset operations.
https://support.wolfram.com/12464
Clean start
Windows: Start Mathematica with the Ctrl and Shift keys pressed.
Mac:   Start Mathematica with the Option and Shift keys pressed.

3 Comments
2023/09/27
12:07 UTC

0

Code required

Mathematica code for quad 4elements formation.

5 Comments
2023/09/26
04:13 UTC

0

Partial derivative is always coming out to zero, why?

Hi there, I'm probably just being stupid, but I can't get the derivative function to work in Mathematica. At least not the way the documentation says it should. With simple functions, it seems to find the answer fine, but for a more complex function, it's always outputting zero as the answer. The documentation says this is because I'm finding the derivative with respect to a variable that doesn't exist in the function, but I don't see how that's possible. Example code is below. (Note E is euler's constant in Mathematica. I don't know why it copies that way to reddit.)

In[71]:=f1[x_, y_] = Cos[xE^(xy)]

D[f1[x, y], x]

Out[71]=Cos[xE^xy]

Out[72]=0

Can anyone explain what I'm doing wrong here?

2 Comments
2023/09/25
00:13 UTC

1

Showing step-by-step work

I'd like to ask if its possible to show step-by-step working using WolframAlpha[] in Mathematica. So far I've seen its possible with simpler differential equations, but seeming doesn't work on more complex matters like DSolve, as shown below. Is there a solution to this or is it just limitations?

https://preview.redd.it/hcflesfvaqpb1.png?width=1038&format=png&auto=webp&s=6f81d6180a9f41a729de4a42c1e6b27495fa8f48

1 Comment
2023/09/22
03:45 UTC

1

Working with successions

Hey I am using mathematica and have some questions on how to define 2 successions, they are the following

qn= (2-q[n-1])^1/2, were q0=0 and n>=0

and

pn=p[n-1]*(2/q[n]), where p0=2 and n>=1

I have defined them as follows:

qn[0] = 0;

pn[0] = 2;

qn[n_] := Sqrt[2 + qn[n - 1]]

pn[n_] := pn[n - 1] * (2/qn[n])

Is that how it should be done? or is it wrong?

Either way, many thanks. Any advice is appreciated

Have a great day :)

1 Comment
2023/09/21
13:02 UTC

1

How to access the results of DSolve?

Just a beginner question that I couldn't solve from reading documentation.

Right now I have

x[t] /. DSolve[{...}, x, t][[1]]

and I want to be able to access values of x at certain t, eg x[5] and so on, and plot x against t. How can I go about doing this?

2 Comments
2023/09/21
11:33 UTC

1

Solving integral equation in Mathematica (numerical/analytical).

Hi, I have to solve an integral equation in Mathematica. I know how to numerically solve a differential equation using NDSolve but I don't know how to solve an integral equation. Please help. The equation is the following:

https://link.springer.com/article/10.1007/s10955-019-02413-1

6 Comments
2023/09/20
02:17 UTC

2

Can i put Mathematica in dark mode?

Hi, i think it can be a little bit annoying to be using mathematica a great time whit a white wallpaper, there is some option to change this? Thanks!

4 Comments
2023/09/14
23:43 UTC

1

Make High Quality Graph Visualization

0 Comments
2023/09/13
15:27 UTC

2

Insider's View of Graphs & Networks

2 Comments
2023/09/06
15:49 UTC

1

How can I make a graph like this?

https://preview.redd.it/xaobkrpwlplb1.png?width=640&format=png&auto=webp&s=dca6d2e9ae041932a3464b47c05a3a0129fb4135

Ideally, I'd like to have all of the tick marks labeled exactly how I want, and no unnecessary tick marks. The points would be cool, too. I like this screenshot, but I'd rather have integer values.

2 Comments
2023/09/01
21:10 UTC

0

Why isn't this zero? Simplify[ Im[Sec[m] , m \[Element] Reals]

Sec maps real numbers to real numbers, so the imaginary part of a real number should give 0.

Why can't mathematica simplify this?

6 Comments
2023/09/01
17:22 UTC

0

I have dyscalculia. What is a good way to calculate how much boating time I have with my electric motor and the batteries that I have?

I have one 12V 225 ah battery and one 12v 105ah battery.

The electric oatboard motor has:
Thrust: 80 lbs
Battery Voltage: 12 Volts
Amperage: 60 A

2 Comments
2023/08/30
22:23 UTC

2

Labeling Framework in Wolfram Language

Hello everyone!

There is a livestream on the Labeling Framework in Wolfram Language by MinHsuan Peng on YouTube!

https://preview.redd.it/xo86xmf3q9lb1.png?width=460&format=png&auto=webp&s=c93f0439363a7abaa58c79a80da98042da3f3379

0 Comments
2023/08/30
15:44 UTC

2

Help for defining object multiplication

I want to write a code that takes in two tuples and multiplies them according to a rule:

A tuple is (A, b, v, s) where A is a matrix, b and s are scalars and v is a vector.

I want to create a "multiplication function" which does the following:

(A1, b1, v1, s1) *(A2, b2, v2, s2) = (A1A2,b1+b2, v1 + (b1)^T A1 b2, s1 + e^b1 s2)

Essentially I want to define these objects consisting of a matrix, a vector and 2 scalars and a binary operation between them. Then I can just set the values of each tuple. It's basically so that I don't have to waste time doing it by hand.

The identity under this multiplication is (I, 0,0,0) and I'd also like to write a code to find the inverse.

4 Comments
2023/08/26
18:43 UTC

1

Equation Generator for Equation-of-Motion Coupled Cluster

Hi everyone!

There is a livestream on Equation Generator for Equation-of-Motion Coupled Cluster Assisted by CAS by Raul Quintero on YouTube!

https://preview.redd.it/sy7zqcxipvjb1.png?width=1920&format=png&auto=webp&s=a0d72d0d6a5cf103ea1a99e17fac2a78f7d517e0

0 Comments
2023/08/23
15:59 UTC

1 Comment
2023/08/23
15:20 UTC

1

Multilevel marketing population growth study

Hi I am doing a study on how multi level marketing businesses work and want to perform a simulation in mathematica of one. The idea is this:

There are resellers (1) of a product within a population n who then sell to consumers (C), a certain number of them (lets say 10) then become resellers (2) themselves and are able to sell products to other people in the population.

For every dollar spend by C, reseller 1 will earn a percentage of the money spent on the product, the same applies for reseller 2 but if reseller 2 signs up under a reseller 1, reseller 1 earns a percentage of what reseller 2 makes.

There is 12% for the different leves to share, so reseller1 might have 7% and reseller2 5% of what C spends.

What I want to find is given a fixed population of people n, how many people would need to be resellers and at what point does this system reach an equilibirum or start losing the business money. Is it possible to do this in Mathematica? Has a study like this been done before?

0 Comments
2023/08/23
11:49 UTC

1

Mapping NearestTo over two lists of lists with a custom DistanceFunction

I’ve been trying to implement the title with the following code:

realnearest = Map[NearestTo[#][A, DistanceFunction -> (Norm[Re[#1] - Re[#2]] &)] &, B]

A and B are both lists of lists, with their sub lists being the same length.

I am trying to find, for every sublist in B, treated as a point, the closest sublist (point) in A, considering only the real distance apart.

This is currently returning a list of NearestTo operations, which seems to be of the right form but I want to actually perform the NearestTo operations and get numbers.

2 Comments
2023/08/22
18:23 UTC

0

Mathematica 8 (HE) & Internet Access

I'm starting to play around with Mathematica and ran into a roadblock immediately. I am using a function that grabs historical data from Yahoo Finance. However, Mathematica thinks I don't have internet access. I've run the internet connectivity test from the help menu and I've turned off the firewall. The issue persists. Can you provide me with some additional troubleshooting steps to clear this up? Here is the error message:

"FinancialData::dlfail: Internet download of data for FinancialData failed. Use Help > Internet Connectivity... to test or reconfigure internet connectivity."

TIA

6 Comments
2023/08/20
18:55 UTC

2

Foreign Function Interface

Hi everyone!

There is a livestream on the Foreign Function Interface by Christopher Wolfram on YouTube!

https://preview.redd.it/91j0n09kqhib1.png?width=1920&format=png&auto=webp&s=2947fc4fa25b034976749adf7b323eae172778a6

0 Comments
2023/08/16
15:53 UTC

2

Is it possible to change use radial gradient fill for the top surface of this annulus in Mathematica?

Code: Graphics3D[ResourceFunction["Annulus3D"][{{0, 0, 0}, {0, 0, 2}}, {1, 3}]]

https://preview.redd.it/qingpe6qqyhb1.png?width=1200&format=png&auto=webp&s=e74aecdad418713ab47acd4a104ec3b8afa67efe

7 Comments
2023/08/13
23:35 UTC

Back To Top