2.26 Thursday, May 28, 2020

2.26.1 Top new questions this week
2.26.2 Greatest hits from previous weeks
2.26.3 Can you answer these questions?

2.26.1 Top new questions this week

PlusMinus definition unexpectedly affects plotting
Can someone boost even more my code?
Why does NMaximize miss this global maximum?
How to break the x axis of a plot?
How to pick consecutive numbers from list?
Multiply each element of second position of two list
Area/Volume of a 2D/3D object as it is filled up with water

PlusMinus definition unexpectedly affects plotting

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222380

In version 10.1 I found a strange Plot behavior I did not anticipate. It seems that various heads including PlusMinus are treated as wrappers and stripped by Plot in a way that is not safe. This ...

asked by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 12 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 12 votes

Can someone boost even more my code?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222464

UPDATE

As suggested by Roman, I’ve included here all my code.

I’m using just bult-in function and compile to boost my code, but I think that it can be better. My code looks like

 
    nof = 30; 
     ...

asked by Magela https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68365 11 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 19 votes

Why does NMaximize miss this global maximum?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222716

I am having trouble maximizing a function which appears as a curvature of a planar curve.

{tmin, tmax} = {0, 2 Pi} 
 
f = -((6-3 Cos[t] - Cos[3 t])/((-11+6 Cos[t] + 8 Cos[2 t] - 6 Cos[3 t] + Cos[4 t]) 
  ...

asked by A. Kato https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62063 8 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 12 votes

How to break the x axis of a plot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222517

I have the following data from which I get an interpolation:

SPE = Interpolation[{{0, 4.08}, {0.5, 9}, {1.5, 12}, {5, 0.158}, {10, 
     0.158}, {15, 0.415}, {20, 0.802}, {30, 2.64}, {40, 4.99}, {60,  ...

asked by mattiav27 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8822 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

How to pick consecutive numbers from list?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222407

Question is very simple. If we have

tst = {2,3,4,6,7,9,11} 
 
result must be 
 
{{2,3,4}, {6,7}, {9}, {11}} 
 
 
There are similar questions, but not exact. 
 
My best solution is: 
 
myFun[arr_] :=  ...

asked by lesobrod https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5950 8 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 14 votes

Multiply each element of second position of two list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222548

If I have two list such as:

list1 = {{40., 7.50551*10^-10}, {40.,7.50557*10^-10}, {40.,7.50566*10^-10}, 
         {40.0001, 7.50578*10^-10}, {40.0001, 7.50591*10^-10},{40.0001, 7.50607*10^-10}, 
        ...

asked by John https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72900 7 votes

answered by David Keith https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44700 7 votes

Area/Volume of a 2D/3D object as it is filled up with water

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222837

How could I get the volume of water on a region as it is filled up with water from below? Assume gravity points in some appropriate downward axis like y (or z in 3D) so the water fills upward from ...

asked by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 6 votes

2.26.2 Greatest hits from previous weeks

Plotting the frequency spectrum of a data series using Fourier
Generate a Unit Circle Trigonometry
Figuring when the minute and hour hand coincide on a clock
Formatting legend text font
How do I clear all user defined symbols?
How to calculate contour integrals with Mathematica?
Calling Correct Function for Plotting DiracDelta

Plotting the frequency spectrum of a data series using Fourier

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18082

testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -> Full] 
 
Gives me 
 
Which I do not expect because the Fourier Transform is FourierTransform[Sin[500  ...

asked by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 14 votes

answered by KennyColnago https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3246 16 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

Formatting legend text font

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3433

I am using this code to plot a graph, and I am trying to make the font of the legend bigger.

<<PlotLegends` 
ListLogLogPlot[{Sort[moby]}, PlotRange -> Full, Joined -> True, 
     ...

asked by Julia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=525 20 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 25 votes

How do I clear all user defined symbols?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=850

Is there some way to do this other than going to 
Evaluation -> Quit kernel and firing a new one up?

asked by niklasfi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=82 95 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 92 votes

How to calculate contour integrals with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34073

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

asked by user64494 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7152 40 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 63 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta\[\] function. When using this inside of a function or just the function ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

2.26.3 Can you answer these questions?

Natural deduction with FindEquationalProof
NDSolve very slow
Change Font and Size of Print[] output

Natural deduction with FindEquationalProof

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222577

Out of curiosity, I’m trying to implement a natural deduction prover in Mathematica using FindEquationalProof. So far, I’ve implemented a few of the easier rules:

axioms = { 
  ForAll[{A, B},  ...

asked by imas145 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61387 1 vote

NDSolve very slow

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222571

I am trying to run this code to get the output from NDSolve for 4 dynamical equations. However, I have two issues:

(1) It is taking a very long time (can reach several hours for a given instance) ...

asked by user135626 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19550 2 votes

Change Font and Size of Print[] output

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222504

I managed to create a definition for the "Print" style, following the instructions here. However, the result does not work in my v.12.1. On the plus side, a "Print" entry exists at the bottom of the ...

asked by Nicholas G https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=43662 1 vote