All Questions
92,233
questions
0
votes
0
answers
83
views
How to set the precision for the entire notebook
I want to do various computations conditional on a given precision for the entire notebook. I use the following code:
...
1
vote
0
answers
34
views
functional derivative with respect to the partial derivative of the metric with xAct
I want to compute the functional derivative with respect to a partial derivative of the metric with the mathematica package xAct.
This is what I have tried so far:
...
2
votes
1
answer
74
views
Rotating text in the Epilog of a plot results in distortion
I want to rotate text in a plot. When I rotate by 90 degrees, or 180, it's perfectly OK. But if I want to rotate to 60 or 45 degrees, then the text appears distorted (see example below). How can I fix ...
3
votes
1
answer
79
views
Nice output for FourierTransform
I want to demonstrate FourierTransform in a lecture. However if you give FourierTransform a differential equation it does not ...
3
votes
4
answers
204
views
Different answers when attempting replacement of function argument
I have three function computing Fibonacci numbers which return correct answers when directly called with e.g. fib1[10]:
...
1
vote
0
answers
31
views
Monitor inside core function
I like DistanceMatrix: its performance is surprisingly high, even for a big data.
However, for a huge arrays and custom ...
3
votes
1
answer
120
views
Why does using a sparse matrix for least squares instead slow down the speed?
Here is the code. The matrix appears to be relatively sparse in terms of its visual representation, but why does using least squares result in significantly slower speed compared to the previously ...
0
votes
0
answers
22
views
Simplify vector calculus based on component splitting
I am interested in verifying a few Vector Calculus expressions using Mathematica.
These expressions are based on splitting a vector field into its transverse components (in the xy- plane) and ...
9
votes
5
answers
3k
views
Digits of Pi in colored spiral
In How to make the digits of π go around in a spiral like this?
it is described how to plot pi in a spiralform (in my case as binary number):
...
0
votes
0
answers
30
views
Function asymptotics showing different result after inter integration [closed]
I have a function fg[r_, t_, t2_, \[Phi]_, DR_]. I want to do the following
Integrate it for t2 from 0 to t
Then take the asymptotic limit r-> 0
The result of ...
0
votes
1
answer
73
views
Which condition is better for WhenEvent?
I'm solving a non-linear system with NDSolve. See my previous post
In the WhenEvent, which one is better for ODE solving
...
2
votes
1
answer
89
views
MaTeX text looks shabby when latex generated pdf is not zoomed
I want to use Matex for the figures in my plots which I eventually would like to use in overleaf. I create a plot and use Matex in it and right click on it to save as pdf. I then use this pdf in ...
9
votes
0
answers
95
views
Searching AnatomyData efficiently
I really like AnatomyPlot3D, but find it exceedingly difficult to find Mathematica's terminology for an anatomical structure. Listing all of them and searching by ...
2
votes
3
answers
370
views
How to handle units of measurement?
I'm trying to understand how Mathematica handles units of measurement.
That is I expect that a calculation should return a certain unit, but I don't succeed. Let's consider this example:
...
0
votes
0
answers
64
views
Maximizing a function that is only defined numerically
I have a function of multiple variables that is only defined numerically. I am trying to maximize the function and find the critical points as fucntions of two parameters p and s using FindRoot but I ...
7
votes
3
answers
122
views
Speed up this computation involving NSolve many times?
Can you think of a way of speeding up this computation ? I don't.
...
0
votes
0
answers
33
views
Trouble implementing switching hybrid system with NDSolve
I'm trying to use NDSolve to simulate a hybrid nonlinear system that switches between different linear behaviors based on states and inputs (i.e. switching from one linear behavior to another) which ...
0
votes
0
answers
396
views
+50
How to include impulses in differential equations?
I have two coupled differential equations as follows:
$$S'(t) = - \frac{a}{1 + B(t)} S(t),$$
$$B'(t) = \frac{c}{1 + S(t)} B(t) (1 - B(t)) - d B^2(t) \Big( \frac{1 - B(t)}{B(t)} \Big)^n,$$
where $a$, $...
0
votes
0
answers
37
views
Euler angles and WignerD, a question of signs
Express a 3D point as a linear combination of Spherical Harmonics, then rotate that point to a new position and find the new expansion in SH :
...
0
votes
0
answers
39
views
How to pattern match multivariate integral?
I have been using a pattern
Integrate[c_ f_, it:{x_Symbol, __}] :> c Integrate[f, it] /; FreeQ[c, x]
which matches an integral and pulls out c if c has no ...
2
votes
0
answers
39
views
Extracting tables from .pdf
Can we construct some automated method for extracting tables from pdfs?
I can get decently far by just copy and pasting its content and splitting at newlines but it would be great if it was possible ...
0
votes
2
answers
91
views
How to build the following region?
Consider a 3D figure defined by the dependence $\Delta x(z),\Delta y(z)$. One example is a pyramidal frustum, for which $\Delta x, \Delta y$ are linear functions of $z$, and $z$ lies inside the ...
7
votes
2
answers
351
views
Why does Blank sometimes not match the empty expression?
Consider these examples:
...
0
votes
1
answer
50
views
Plotting an integral with solving for a specific constant [closed]
Given an Integral I(t) which is a function of a constant tc, this constant is determined with the condition I(tc)=0, how can I add this condition?
0
votes
1
answer
47
views
Pointwise convergence of Fourier series: partial sum animation not rendering plot
I'm new to Mathematica (13.3) and I'm attempting to demonstrate the pointwise convergence of the Fourier series for the square wave function f in particular, by showing via Animate/Manipulate that as ...
5
votes
1
answer
147
views
Why is the graph size decreasing in 'Column'?
I printed out the graph in two ways.
Plot[Sin[x], {x, -3, 3}]
Column[{ "Plot[Sin[x],{x,-3,3}]", Plot[Sin[x], {x, -3, 3}] }]
Comparing the results of the ...
0
votes
1
answer
51
views
Numerical Integration without giving all values [closed]
Is there a way to solve expressions numerically, while keeping other variables.
For example, I want to Integrate the expression below for $\theta p,\theta q$ while keeping other things as it is. The ...
0
votes
0
answers
100
views
Mathematica program reopen problem [closed]
Has anyone encountered such a problem, every time after completing an MMA program, running and exiting it, then opening it again, it becomes like this below:
And not just this program, all will become ...
4
votes
3
answers
629
views
How to remove a high accuracy numerical number from a list?
My numerical calculation gives a list of numbers
list = {-0.36, 0.2499999999999992, -0.21, 0.36, 0.36},
I want to delete 0.25 ...
0
votes
1
answer
70
views
PiecewiseExpand fails to address assumptions
PiecewiseExpand seems to ignore more complex assumptions. Here's an example:
...
0
votes
1
answer
67
views
1
vote
1
answer
45
views
Error in using the function NDSolve
I am trying to numerically solve a system of ordinary differential equations.
...
1
vote
2
answers
97
views
How to construct a custom-made matrix conditional on a set of rules?
The following code does what I intend to achieve; however, it is too cluttered for a simple matrix operation. I like to reduce the code to a one-line code as a ...
0
votes
0
answers
99
views
Apply the IntegrateChangeVariables function correctly
Please help me apply the IntegrateChangeVariables function correctly for my case. I need to change the integration variable from Tau to b(t). * in the photo corresponds to Begin in WM. Photo 3 shows ...
2
votes
1
answer
48
views
How to linearize these terms in many different variables? [duplicate]
How to linearize these terms in q[t] and p[t,y]
...
3
votes
2
answers
125
views
Choosing desired text on the axis
I've got this plot for instance.
Plot[x, {x, 0, 5}, Frame -> True]
how can I insert a text on the axis, for exapmple between 1 and 2 I want to write "a&...
0
votes
0
answers
54
views
Seeking Wolfram Mathematica Techniques for Detailed Step-by-Step Solution of Integral Equation Transformation [closed]
Hello Mathematica Community,
I am working on a mathematical problem where I need to transform an integral equation into a simpler form using Euler's Formula and the Error Function. My current ...
0
votes
1
answer
85
views
How to make the function compile into C faster, and how to determine which portion of the code occupies more memory?
If changing the value of 'n' from 2 to 3 in the above code increases the compilation time from one minute to ten minutes, is there a way to speed it up? Also, the code consumes too much memory during ...
0
votes
0
answers
67
views
Method to make this complicated integration from interpolating function? [closed]
Hello I want to do this integral
Mu[Psi_, R_] = Integrate[ D[Integrate[Rp f[Psip, Rp]/Sqrt[R^2 - Rp^2], {Rp, 0, R}], R]/ Sqrt[Psi - Psip], {Psip, Psi0, Psi}]
...
3
votes
2
answers
181
views
Area of a parametrically defined function
I can’t solve the problem; I need to find the area of a parametrically defined function. According to the graph, part of the area has a negative sign.
...
1
vote
1
answer
64
views
Strange behavior of GroebnerBasis
Recently I tried to solve a multivariate quadratic equation over the reals, but with a parameter value. Since that took too long, I decided to try GroebnerBasis, ...
2
votes
0
answers
33
views
Option management with helper functions
I found this example in the documentation of OptionValue
Why does f need to be an argument of ...
7
votes
3
answers
323
views
Sum of its parts - replicating a porcelain sculpture of Nuala O’Donovan
1. Introduction
Nuala O’Donovan is an Irish Artist, living and working in Cork. According to her website her research areas are "Irregularities in Patterns in Nature" and "The Geometry ...
0
votes
0
answers
33
views
PlotLegends not respecting PlotRange in ArrayPlot and MatrixPlot
I have a matrix that I want to plot. This matrix has data with values ranging from 1400 to -50. If I do
...
4
votes
1
answer
98
views
How can I find some first terms of a sequence?
I have a sequence knowing that $a_1=15$, $a_{n+1} = a_n + \sqrt{2a_{n+1}-a_n}$. I want to find some the first terms. I tried by my hand
...
4
votes
3
answers
171
views
Automatically extract a factor from a sum of terms and rewrite the sum
I would like to automatically extract the same factor of each term, and thus write a sum such as:
$$\frac{4 \sin (2 \pi x)}{\pi }+\frac{4 \sin (6 \pi x)}{3 \pi }+\frac{4 \sin (10 \pi
x)}{5 \pi }+...
0
votes
0
answers
57
views
FunctionCompile get IR source code [closed]
A new fancy option to compile WL's function using LLVM is amazing.
Is there any way to get the IR's (intermediate representation) representation of it?
According to specification there are two forms ...
0
votes
0
answers
62
views
Calculation hangs when called an own function from own loaded package. Debug output shows strange things
I created a package a long time ago and it was working, but in the versions 13.2 13.3 an old created function hangs when called. If I evaluate the same function from a cell manually and then call, it ...
0
votes
1
answer
60
views
0
votes
0
answers
28
views
Kramers-Kronig Relation to find the real and imaginary value of refrective index from absorption data? [closed]
Can anyone please let me know how to use and write a code for Kramers-Kronig Relation to find out the real and imaginary part of reflective index.
I have the absorption data of MoS2 in the wavelength ...