Learn Math

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...
Read More
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...
Read More
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,...
Read More
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...
Read More
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}};...
Read More
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...
Read More
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...
Read More
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...
Read More
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,...
Read More
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...
Read More
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}};...
Read More
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...
Read More
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...
Read More
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...
Read More

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 …

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, …

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 …