# Learn Math

##### Plot The volume of a cylinder between a cone and XY
I want to plot the volume of a cylinder between a cone and the plane XY The equation of the cone is zz == √x2+y2\sqrt{x^2...
##### Interpreting P-Value on ParameterTable
When using LinearModelFit[] we can generate a table of parameter values and statistics for the corresponding model using the property “ParameterTable”. Looking in the documentation...
##### Manipulating List?
I have a huge list with 1000 elements. Manually entering and calculating SUM of probabilities it would take a few hours. Example: list = {1,...
##### PlotLegends in ListPlot does not display different markers
I would like to plot a graph with the legends at its side. However, I have managed to plot the legends, but the markers do...
##### FindMinimum function does not produce minimum from near point
Using my simple program and I would like to find such matrix elements that minimize difference of their eigenvalues. H1 = {{1, 2}, {3, 4}};...
##### Table of ParametricPlots crashes Kernel
I can usually crash the Mathematica Kernel by using Table to generate a List of ParametricPlots, as follows: testpara[α_] := ParametricPlot[ { {Cos[θ], Sin[θ]}, {2...
##### Plot The volume of a cylinder between a cone and XY
I want to plot the volume of a cylinder between a cone and the plane XY The equation of the cone is zz == √x2+y2\sqrt{x^2...
##### Interpreting P-Value on ParameterTable
When using LinearModelFit[] we can generate a table of parameter values and statistics for the corresponding model using the property “ParameterTable”. Looking in the documentation...
##### Manipulating List?
I have a huge list with 1000 elements. Manually entering and calculating SUM of probabilities it would take a few hours. Example: list = {1,...
##### PlotLegends in ListPlot does not display different markers
I would like to plot a graph with the legends at its side. However, I have managed to plot the legends, but the markers do...
##### FindMinimum function does not produce minimum from near point
Using my simple program and I would like to find such matrix elements that minimize difference of their eigenvalues. H1 = {{1, 2}, {3, 4}};...
##### Table of ParametricPlots crashes Kernel
I can usually crash the Mathematica Kernel by using Table to generate a List of ParametricPlots, as follows: testpara[α_] := ParametricPlot[ { {Cos[θ], Sin[θ]}, {2...
##### Animation of a plane wave
I want to animate in 3D the plane wave sin(ωt+kx+ϕ)sin(ωt+kx+ϕ)\sin(\omega t+kx+\phi), but following the form from the documentation, I can only make kkk or ωω\omega...
##### Removing solutions which are particular cases of others
I have an algorithm which gives me a list of solutions (in matrix form, if it is of any importance) of an equation. Some of...

## Why does InverseFourierTransform gives different result to doing it by hand?

When I can calculate an inverse fourier transform by the built-in function InverserFourierTransform, the result is different from what I calculate by definition through integration manually. and I noticed that if I give a negative sign in the Exp function, then the solution is exact the same. See here: ================= …

## BoxWhiskerChart Vertical Line

I have made a box plot to show the spread of past paper results for my A2 exams so I can easily see which subject need more work! BoxWhiskerChart[data, “Outliers”, ChartLabels->{data[[All,1]]}, BarOrigin->Left, ImageSize->Medium, ChartStyle->Blue] The above code gives me the following output: Now, the average for an A is around …

## Why does ReplaceAll behave so oddly?

ReplaceAll can behave a bit oddly. Consider (-1)^(1 + n)*Gamma[2 + n] /. {Gamma[s_] :> (s – 1)!, -((-1)^(a_)*(b_)) :> (-1)^(a + 1)*b} (*(-1)^(1 + n) Gamma[2 + n]*) Nothing is changed. But (-1)^(1 + n)*Gamma[2 + n] /. {Gamma[s_] :> (s – 1)!, -(-1)^(a_) :> Times[(-1)^(a + 1)]} (*(-1)^(1 …

## Mean of inverse probability distribution does not agree with explicit integral

I tried to work with the inverse exponential distribution and encountered the following, which I think is an inconsistency in Mathematica (version 10.0.2): dist = ExponentialDistribution[l]; distInv = TransformedDistribution[1/x, x\[Distributed]dist]; pdfInv[y_] = PDF[distInv, y] ; pdfInv[y] // InputForm (*Out: Piecewise[{{l/(E^(l/y)*y^2), y > 0}}, 0] *) Mean@distInv (*Out: -l (EulerGamma + …

## Combine 2 plots in one [closed]

f:R2−>R,f: R^2 -> R, f(x,y)=xÂ²−yÂ²f(x,y)=xÂ²-yÂ² VectorPlot[{2 x, -2 y}, {x, -3, 3}, {y, -3, 3}] ContourPlot[x^2 – y^2, {x, -3, 3}, {y, -3, 3}, ColorFunction -> “DeepSeaColors”, PlotLegends -> Automatic] I want both plots (VectorPlot and ContourPlot) shown in one figure. How to approach this ? ================= ================= 3 Answers …

## Why can Reduce solve for Integers but not for Reals?

I’m showing as an image, since the question is generic. If we remove mm from the inequality we get both solutions. Why doesn’t the first inequality work for both domains? Edit here is the code per request: Clear[m, n, c, d]; c = (m == 1 && n >= 0 …

## Solving a complex logarithmic equation

I am trying to solve the following equation for xx, with integer nn. (1 – ((-1 + x)^E x^(1 – x) Log[x]^-E)^(1/(-1 + E)))/(-1 + x) == n =================      Is xx constrained to be real? positive? non-negative? Can nn be zero or negative? You have not specified such …

## How to transform ListPlot ticks

I am sure that this is a standard question, but I have not been able to find it, either by a google search or by searching here on the Mathematica StackExchange. If I have a list plot defined by: GraphicsGrid[{{ListPlot[AmplitudeData, Joined -> True, PlotRange -> All], ListPlot[RealData, Joined -> True, …

## How can I copy and paste my beautifully indented code into my notebook without alteration?

Say I indent my code like this: Which[ {x1, y1 + 1} == {x2, y2 – 1}, { pos1 = pos1 /. {{x1, y1} -> {x1 = 2, y1 = 2}}, pos2 = pos2 /. {{x2, y2} -> {x2 = 2, y2 = 4}}, pos3 = pos3 /. {{x3, y3} …

## InfiniteLine Woes [closed]

I am puzzled that the InfiniteLine below intersects with only one of the two points. Graphics[{PointSize[.04], Point[a = {6, 17}], Point[b = {7, 37}], InfiniteLine[a, b]}, Axes -> True, GridLines -> {{a[[1]], b[[1]]}, {a[[2]], b[[2]]}}, PlotRange -> {{0, 10}, {0, 40}}, AxesOrigin -> {0, 0}] Any ideas about what is …