All Questions

3
votes
2answers
562 views

What does a/.b[c][[1]] mean? [closed]

The function b[c_] has been previously defined. Does that "1" refer to the smallest number of a list?
0
votes
0answers
41 views

A function for finding normal edge-5-colorings of cubic graphs

It would be nice if the following were available: Definition A normal edge-k-coloring of a cubic graph $G$ is a proper edge-$k$-coloring of the graph such that for any edge $e\in E(G)$, $e$ and the ...
0
votes
0answers
35 views

RSolve gives negative solutions [on hold]

I'm getting some curious behaviour with a certain equation; I asked Mathematica to solve a recurrence relation, and to my surprise it actually could, as I was doubtful it had a closed solution ...
1
vote
2answers
157 views

Dynamic number of parameter fits in Mathematica

I am trying to learn if in Mathematica one can perform fits of analytic functions that are expanded and written as power series. In particular, we can consider the following generic form: $$ f(B,x) = ...
1
vote
0answers
44 views

Prospective StartOfTime and EndOfTime in Mathematica

When working with conditions for numbers we have a notion of \[Infinity] representing larger than any other number and similarly ...
0
votes
1answer
26 views
1
vote
1answer
37 views

Three questions to customizing `Ticks` in `Plot`, `LogPlot` and `LogLogPlot`

When making a plot, sometimes I would like to alter the ticks and labeling of the ticks, in particular when doing a LogPlot or ...
1
vote
1answer
22 views

Behavior of PlotLegends

I want to have a plot of $x^{\alpha}$, where $\alpha$ is an input, and a plot legend which displays something like $\alpha = \# \text{ rad}$ on the following plot, where # is determined by the input. ...
1
vote
0answers
42 views

How can I handle box drawing characters?

I must generate files for windows batch scripting, modifying template files, es. ...
1
vote
0answers
33 views

Print 4x4x4x4 tensor as 4x4 matrix of 4x4 matrices [on hold]

I'd like to print the LeviCivitaTensor[4] tensor as 4x4 block matrix of 4x4 matrices The following code works to display the LeviCivitaTensor[3] tensor as a 3x1 vector of 3x3 matrices. ...
0
votes
1answer
56 views

Sum of powers of zero [duplicate]

I would like to calculate the following sum Sum[0^(k-a), {k, 0, Nin}] for a positive integer $a$. With considering $0^0=1$, my expected answer of the sum is $1$, ...
1
vote
2answers
64 views

Save part of memoized function

I have a function whose performing a series of expansions of a complicated function, which can take a lot of time. To avoid bottlenecks, I use memoization so I need to evaluate it only once. For ...
1
vote
1answer
51 views

How to generate such an image?

Inspired by this, I'm using Graphicis to generate such a image, but it return I want every disk to be the same color. How to modify to make it work? Using image ...
2
votes
1answer
34 views

How to apply AlphabeticSort to a code cell?

I've got a single code cell in a notebook with lots of Usage messages in no particular order. I'd like to alphabetize them, but doing it manually would be a ...
0
votes
1answer
30 views

How does Mathematica solve this 2D piecewise function from constraints?

I am interested in learning the technique(s) used to solve the following 2D piecewise equation for $x, y$ when given $z$, where $z = f(x, y)$. $\text{Given that $x \in \mathbb{Z}$, $y \in \mathbb{Z}$}...
0
votes
1answer
29 views

Problem with manipulate solution NDSolve and initial condition

I'm getting crazy with this Manipulate : ...
2
votes
2answers
30 views

Piecewise function and deriving - solving

I'm working in a (Economics) problem where I want to add two concave (profit) functions in order to maximize them together through one variable (quantity). My problem is that one of the two functions ...
0
votes
1answer
31 views

Interesting output in Integrate [closed]

I found interesting behaviour, best illustrated in the following example. When trying to evaluate Integrate[1/(d^2 - 1), d] Mathematica 11.3 gives the following ...
2
votes
1answer
35 views

How to import a part of an Excel file?

I'm trying to import a part of an excel, the column 20 and the row between 6-59 in this column. I tried : tab = Import[ "file.xlsx"]; time = tab[[20, 6 ;; 59]] ...
3
votes
2answers
89 views

Stability region of nonlinear ODE system

Sol is the evaluation at $t=100$ of the solution of a nonlinear system of three differential equations with initial values at $a$, $b$, $c$. This is obtained with the function ParametricNDSolveValue. ...
4
votes
3answers
403 views

Numerical second order differentiation

I have written a code for the second differentiation of numerical list ...
0
votes
1answer
45 views

In NCAlgebra, how can we make d**d**d=0 if d**d=0 is given?

I wrote the following code to eliminate $d^n$ from the equation for $n>1$. ...
10
votes
1answer
154 views

How to calculate $\displaystyle \prod_{p}\frac{p^2+1}{p^2-1}$?

When I input $$ \prod _{p=2}^{\infty } \text{If}\left[\text{PrimeQ}[p],\frac{p^2+1}{p^2-1},1\right] $$ in Mathematica 12.0, it gives out the value $1$. The result is ridiculous, for that according to ...
1
vote
1answer
31 views

Comma separated images for .gif creation

I recently created a key frame animation using Mandelbulber 2.18-1. Each .png image was placed in a folder with known location. I then dragged all the images and dropped them into a Mathematica ...
0
votes
0answers
38 views

Mathematica 11 in Ubuntu 18.04 does not display special characters in the notebook

"Special" character, like pi (esc p esc), don't appear. They are instead replaced by a dotted gray square: How can I change this? Mathematica worked just fine before I upgraded Ubuntu to 18.04. I ...
1
vote
1answer
44 views

Turn PasteButton into keyboard shortcut

I'm looking for a general "recipe" to do with a keyboard shortcut what I currently do with a PasteButton. Here is a working toy example ...
2
votes
1answer
34 views

Missing ticks and numbers on a plot when using JLink + Mathematica 11.3

I am facing a pretty random problem using JLink (Java) connected to a Mathematica 11.3 kernel and front-end. Basically I want to get an image using the JLink Java method ...
4
votes
2answers
208 views

Improving do loop speed with IntegerQ conditions

The following program runs rather slow when the upper bound for n gets large (~6 secs for 10^5). ...
1
vote
1answer
66 views

Sharp jagged lines in Plot3D

I have the following function of five parameters of which I would like to construct a 3D density plot using Plot3D ...
1
vote
1answer
104 views

Difficulty with numerically integrating highly-oscillatory function

I'm interested in numerically solving a "highly-oscillatory" function. I've tried increasing the "max-recursion" and "precisiongoal", but it appears as though my answer is still not converging to the ...
2
votes
1answer
57 views

Inserting several lines in determined places of a 3D plot

I have a special list instead of which I create another one by a Table ...
5
votes
1answer
37 views

How to make help open local help automatically instead of asking to choose each time?

Since I am asking today about new changes in version 12 display, I might as well ask about this change. Each time, when asking for help using ?Command, I now find ...
7
votes
0answers
94 views

How to make version 12 print Root objects to screen normally as in earlier versions?

From clean kernel, when typing result = Reduce[2 d^2 == -((2*(1 + d) + ((4 d^3)/(1 - d)))*(d - 1)),d] Here what version 12 displays on the screen, compared to ...
0
votes
0answers
31 views

Translate Mathematica Output to Latex type font [duplicate]

In solving the inequality $2d^2\ge -(2(1+d)+\frac{4d^3}{1-d})(d-1)$, Mathematica returns something using Slots and Functions: ...
3
votes
1answer
38 views

How do I store the results of NDsolve, in a table for plotting later?

Basically, I wanted to vary a parameter in my differential equations, while using NDsolve (ParametricNDsolve wasn't working for some reason, but that's for another question). I'm stuck looking for the ...
1
vote
3answers
76 views

Sum with variable terms to sum over

Suppose I have a polynomial like this: $$a=x_{j_1} + x_{j_1}x_{j_2} + x_{j_1}x_{j_2}x_{j_3} + ...+x_{j_1}x_{j_2}x_{j_3}...x_{j_n}$$ I want to create a function that takes this polynomial and does the ...
2
votes
0answers
28 views

FindEquationalProof to prove divisor theorem

I'm trying to implement proofs of concepts for Equational Proofs on some basic number theory theorems. One such example is: "let a and b be positive integers and let d = gcd (a, b). If t divides ...
2
votes
1answer
104 views

Why doesn't Mathematica completely draw the fit?

I have a question, and I really need your help, because I think I'm not understanding the reason... I have a potential model.. F[x_] := k x^n for the next ...
1
vote
1answer
38 views

Reduce all pairwise comparisons in a list

I have a list of 37 values, like $2d^2$ and $2d(1-d^2)$. I know I can use Reduce[] to solve an inequality of the values. For example, ...
2
votes
0answers
34 views

Using InitializePDECoefficients to solve a finite element problem

I am trying to set up a differential equation using InitializePDECoefficients and then solve it using the finite element method. Below I show one calculation that ...
0
votes
1answer
69 views

Implicit Function Theorem

I think I am stuck here right now: The exercise is to use implicit differentiation to determine y' considering the following equation: I managed to do this with: ...
0
votes
0answers
15 views

Strange Import behaviour from wls script

I have a data file that is composed as follows ...
2
votes
1answer
44 views

How to write down a probabilistic function in Wolfram Language?

How does one write a Wolfram function which has a 25% chance of returning 1, a 50% chance of returning 2, and a 25% chance of returning 3? Here is how the data structure might look like: ...
2
votes
2answers
78 views

Simplify $w^{3n}, w^{6n}, w^{3 + 3n}, w^{4+3n}$, etc. using $w^3=1$

I having an expression containing terms that are powers of $w$. How can I simplify these terms using the assumption $w^3=1$? ...
1
vote
1answer
26 views

Selecting only the terms whose exponents add up to a specific number

Suppose I have the expression from a truncated series: ...
1
vote
1answer
57 views

Errors from NDSolve

I'm trying to solve a system of PDEs with periodic boundary conditions using NDSolve. This works if I don't specify an initial condition (but is uninteresting, ...
5
votes
4answers
235 views

Threading data on TimeSeries

Say I have two TimeSeries: x = TimeSeries[{2, 4, 1, 10}, {{1, 2, 4, 5}}] y = TimeSeries[{6, 2, 6, 3, 9}, {{1, 2, 3, 4, 5}}] x has a value at times: 1,2,4,5 y ...
0
votes
1answer
43 views

Simulation of bullet with cannon

I want to reproduce a simulation involving a movable cannon and a movable target of varying size. The cannon is fixed such that the vertical height is variable but the x and y position is fixed. ...
1
vote
1answer
27 views

Replace series with restrictions

I am trying to implement a code where I have the following problem: Consider I have the following series, which I can express as follows: $$ \sum_{j<k} x_j^4 x_k^4 = \frac{(\sum_j x_j^4)^2 - \...
0
votes
0answers
34 views

Combinatorics/Permutations [migrated]

A village has about 1 million residents. Suppose each resident has a jar with 100 coins in it.Two jars are considered to be “equivalent” if they have the same number of 10c, 20c, 50c, \$1 and \$2 ...

15 30 50 per page