All Questions
95,384
questions
0
votes
1
answer
9
views
Maximize finds solution outside the constraint
I'm trying to maximize a (quite simple) polynomial inside a sphere. The command is simply:
...
0
votes
1
answer
32
views
How to make conditions works in Which?
How to make Condition convert to common expresstions when it mathes Which test.
...
0
votes
0
answers
27
views
Finding Lyapunov exponents from Hamilton formalism
I have the following Mathematica code to find the Lyapunov exponents for a given Hamiltonian. I use an algorithm developed by ChrisK for my code given below:
...
0
votes
1
answer
29
views
Custom (semi-circle) distribution not playing well with RandomVariate?
I have created a custom probability distribution that is a semi circle with area 1:
myD = ProbabilityDistribution[Sqrt[2/Pi - x^2], {x, -Sqrt[2/Pi], Sqrt[2/Pi]}]
I ...
1
vote
0
answers
56
views
Changed behaviour of Interpolation
Consider the following code:
Interpolation[Table[{i, 2 i}, {i, 10}], InterpolationOrder -> 1][{5}]
Mathematica 13.2 on Windows 11 returns ...
0
votes
0
answers
35
views
How to make a smoothed 3D histogram from data contained in a large file on my Mac computer
The original data is in a file "ABC" in a directory on my Mac computer. ABC has 20000 lines, each line has 2 real numbers.
How do I import this file into Mathematica and pass it to ...
0
votes
0
answers
17
views
How to determine a timeout in loop and truncate the loop?
I have a Do loop with a single sentence in it:
Do[
(*A single sentence here*)
,{i,100}]
Unfortunately, this sentence could be very time-consuming, so I want to set ...
0
votes
0
answers
18
views
How to Find the Subspace of 𝐵 B Excluded from 𝑄 Q-Image and Kernel? [migrated]
Let A, B, and C be three vector spaces, and consider a map Q that takes vectors from
A to vectors in B, and from B to vectors in C. One could think this map as a matrix acts on vectors in A and B. A ...
2
votes
0
answers
40
views
Need help to find a generalized solution for a given system
I'm solving two sets of equations, the equations are given below,
$-\frac{t'[\lambda]}{z[\lambda]^{2}}+\frac{z'[\lambda]^2}{z[\lambda]^2}=1$
$t'[\lambda]^2=\frac{p^2 z[\lambda]^{2}z'[\lambda]^2}{1+p^2 ...
1
vote
0
answers
40
views
Poincare section for a cigar shaped geometry
Here is the mathematica code that I am using to find the Poincare Section of a Cigar Shaped AdS-soliton background:
...
2
votes
0
answers
58
views
Can't compile a standalone app in 14.1
I read the article reviewing the innovations in version 14.1 and am absolutely thrilled to be able to build a standalone app. I tried to replicate the example from the article in an even shorter form, ...
0
votes
0
answers
42
views
How to color contour lines with functions [duplicate]
For example: a Implicit functions X^2 + y^2 == 1, i want to plot it and color it with function x + y to display the size of x + y in different positions on this Implicit functions. What should i do?
...
0
votes
0
answers
45
views
How to change the default behavior of a function permanently?
For example, I want the function Animate to work with options ...
0
votes
0
answers
22
views
How to hide regionfunction [duplicate]
I just want to show the part of the cylinder and hide the transparent regionfunction.What should I do?
0
votes
1
answer
74
views
NMinimize finds solutions outside of the constraint set
I have a feasible compact convex program of the form:
$$\begin{aligned}\min_{\substack{x_i\in[0,1]\\z_i\in[x_i^3,x_i]}}&\quad\quad\sum_{i=1}^n a_iz_i+d_ix_i\\\text{s.t.}&\quad\quad\sum_{i=1}^n ...
0
votes
1
answer
50
views
Pressing Ctrl+( with highlighted text converts them into some markup code and won't undo
I am new to Mathematica, and I am using Mathematica v12.3. I am writing some math notes which include text and some equations. I know that in a text cell I can press CTRL+( and start typing some ...
2
votes
0
answers
47
views
How to generate lensed light animations like this?
How can one generate the projection simulation effect in the following video (from Apple's webpage (minus the logo of course)).
I would like to be able to create a similar-looking shader animation in ...
1
vote
1
answer
58
views
NMaximize::ntcnvx: The optimization was not solved by convex methods
I have a complex (but still finite-dimensional convex) program in mind for which I want to use Mathematica to solve numerically. For this reason, I was trying my hand on simpler instances. Consider ...
0
votes
0
answers
55
views
Plotting solution of a 3 body problem with given initial conditions
Disclaimer:I am not trying to find new solutions for the 3 body problem (3bp), I already have the initial conditions and I already know what configuration I should get.
I am trying to create an ...
3
votes
1
answer
100
views
How to delete members of a list by rule
I have a list:
lis = {"a",1,""}
and would like to delete from the list all elements that consist of "" to give:
...
0
votes
0
answers
40
views
Inbuilt function in NonlinearModelFit
Can you please tell me about the inbuilt function in NonlinearModelFit? Is it related to least-square fit? If yes, please describe.
...
0
votes
0
answers
84
views
I discovered this pattern for factorials - does it hold true for all factorials? [closed]
Code that reproduce (with corrections) the original post:
...
3
votes
1
answer
109
views
How can I draw triangles within in a triangle if I know their perimeters?
I am trying to draw this picture with perimeters of the triangles in a larger triangle. I don't know how to start.
0
votes
0
answers
49
views
4D Poincare surface of sections
I'm trying to plot 4D Poincare surface of sections. I have integrated the equations of motion, and I also know how to plot 2D Poincare surface of scetion, but facing difficult in plotting 4D.
In 4D ...
1
vote
1
answer
103
views
Solve and understand a NDSolve error: Step Size effectively zero; singularity or stiff system suspected
I am trying to solve the non-linear differential equation:
$$ \ddot{x}(t) =\frac{3kx(t)}{\gamma^2}\left[kx^4(t)-2 \right] $$
numerically on Mathematica, but I can not find a solution.
My code is:
<...
0
votes
0
answers
55
views
Why Won't My Functions Plot? [closed]
I've been trying to graph a function with a domain between [-4Pi,4Pi], but the function can't be graphed as soon as I add Pi to the domain:
So what's the issue here? Is there a workaround for this?
1
vote
1
answer
40
views
Using Collect on constant terms within an equation with derivative terms
I would like to use the Collect[] function to gather terms that have the same powers for some constant parameter a.
For example:
...
0
votes
1
answer
94
views
2
votes
1
answer
121
views
Weird error in RegionPlot3D?
I am trying to plot a sphere with radius varying with the angles.
Here is the code
...
0
votes
0
answers
33
views
RSolve for a recurrence relation with Kronecker-Delta and its closed form
Assume the following recurrence relation for $n\ge 0$
\begin{equation}
(\gamma+x(2n+1)) a_n=x (n+1) a_{n+1} + x n a_{n-1}+ x (\delta_{n,0}-\delta_{n-1,0})
\end{equation}
This recurrence relation ...
1
vote
0
answers
68
views
Mathematica just returns the same equation when asked to solve integral equation of Volterra
I am new to Mathematica. I try to compile the example shown in this article
After copying and pasting the first two lines, and then pressing Shift + Enter, the program always returns the initial ...
0
votes
2
answers
131
views
A probability problem involving no replacement
Question:
There are 6 identical balls, numbered 1, 2, 3, 4, 5, 6. Three balls are drawn successively without replacement. Let m be the average of the numbers on the first two balls drawn, and let n be ...
0
votes
0
answers
36
views
FindSequenceFunction[] fails to infer a sequence pattern
I have to compute the following function:
$$\sum _{i=0}^{\infty } \left(1-\sum _{j=0}^{\min (i,2 n)} \frac{n^{-i} \Gamma (j+1) \Gamma (n+1) 2^{-i-j+2 n} \mathcal{S}_i^{(j)}}{\Gamma (j-n+1) \Gamma (-j+...
3
votes
1
answer
134
views
Using NDSolve to solve the PDEs and their reduced ODEs yields inconsistent results
I am working with a system of coupled PDEs:
\begin{align}
\partial_tP_x(t,x)&=(\omega_0+\gamma gx)P_y(t,x)-P_x(t,x)/T_2+D\partial_x^2P_x(t,x)\\
\partial_tP_y(t,x)&=-(\omega_0+\gamma gx)P_x(t,x)...
0
votes
0
answers
35
views
How to speed up Factor?
Try the following code
...
0
votes
0
answers
27
views
Fourier transform of a symbolic function
In Mathematica: How can I compute the Fourier transform of a symbolic function $x\partial_y f(x,y)$?. I know that, $(x\partial_y f(x,y))^{\wedge}(\xi,\eta)=\xi \partial_\eta \widehat{f}(\xi,\eta)$.
0
votes
0
answers
36
views
Different computer hardware give very different NIntegrate result?
If two computers are running Mathematica with the same version "14.1.0 for Microsoft Windows (64-bit) (July 16, 2024)" and all the NIntegrate options are ...
1
vote
0
answers
61
views
Why is the solution to a harmonic equation split into two classes when one class suffices?
If we solve $\sin(x) = 0$, we arrive at $$x = n \pi, n \in \mathbb{Z}$$
When I do (Reduce also returns the same)
Solve[Sin[x] == 0, {x}, Reals]
The result is
$$\{...
1
vote
0
answers
67
views
With both 14.0 and 14.1 Save as PDF (print preview) has become completely mangled
For over a decade, I have been using the same method of creating and saving notebooks as PDF. For some reason saving to PDF started to produce complete gibberish for most of the styles I use. It ...
1
vote
1
answer
47
views
How to make Simplify run faster
So I have the function of an arbitrarily oriented torus and I wanted to run simplify on it to see if mathematica can find any simplifications on it. But Simplify ...
0
votes
0
answers
19
views
Temporary directories left behind by the CreateArchive function
The CreateArchive function sometimes leaves empty subdirectories of the form m_x in the destination directory, where x is a ten-digit alphanumeric identifier that ...
2
votes
1
answer
46
views
How to sum with respect to partitions
I would like to know how to program this type of sums, with the first two values whatever I want $S_{k}(0)=m$ and $S_{k}(1)=t$, and for n>0:
$$S_{k}(n+1)= \sum_{r_{1}+r_{2}+\cdots +r_{k}=n}S_{k}(r_{...
0
votes
0
answers
48
views
How to stop the cursor from jumping out of parentheses/brackets/braces
I am having an issue that is seriously impacting my ability to fluently write code in wolframnotebook 14.1.
Whenever my cursor is just behind an opening bracket/parenthesis/brace, it automatically ...
1
vote
0
answers
98
views
What is Mathematica's equivalent of Maple's package algcurves?
Maple has a package called algcurves for plane algebraic curves, providing some powerful functions. For instance, it can compute a basis for holomorphic differentials, locate all singularities, ...
1
vote
1
answer
53
views
1
vote
1
answer
39
views
Unevaluated indexed variable in the events when using Table or Array generating a list of events [duplicate]
I want to use Table or Array to generate a list of events for NDSolve, but the variables (<...
1
vote
2
answers
123
views
Issue with variable within Sum[] bounds
I have the following sum that starts from a variable lower bound index $n$:
$$\sum _{y=n}^x \frac{n^2! \left(n^2\right)^{-x} \mathcal{S}_x^{(y)}}{\left(n^2-y\right)!}$$
I tried to compute a closed ...
0
votes
0
answers
37
views
Labeled[..,..,Above] giving MapThread::mptd errors
As far as I see there is no single thing on the internet with errorcode MapThread::mptd being associated with the Labeled ...
4
votes
2
answers
355
views
Sum[] function not computing the sum
I have the following sum:
$$\sum _{y=0}^x \left(1-n^2! \left(n^2\right)^{-y} \mathcal{S}_y^{\left(n^2\right)}\right)$$
Which, in Wolfram language can be written as:
...
4
votes
0
answers
200
views
Why does DiagonalizableMatrixQ give different answers when Simplify or FullSimplify is applied to a 4x4 matrix, consisting of complex trig. functions?
NOTE: I HAVE CLEANED UP THIS DISCUSSION TO MAKE THINGS MORE TRANSPARENT:
I am using Mathematica version 12.1. I have a 4x4 matrix called matrixA[x, y], which ...