Articles of mathematica

How to plot a phase potrait of a system of ODEs (in Mathematica)

I am asked to use mathematica to plot the fixed-points of the following system $$ \frac{dN}{dt} = -\gamma N \left( 1 – \left( \beta M + N\right) \right) $$ $$\frac{dM}{dt} = M \left( 1 – \left( \alpha N + M\right) \right) $$ for the case where $\alpha = 2,\ \beta =2,\ \gamma=1$. I assume it […]

Odd Mathematica series result

I asked Mathematica to evaluate $$\sum_{i=1}^{\infty} \cos(i a)\cos(i b)$$ where $a$ and $b$ are unspecified real numbers, and it told me the answer was simply $-\frac{1}{2}$. This is clearly wrong, as I expect the series to fail to converge for almost any choice of $a,b$ — but is there some formal sense in which Mathematica’s […]

Switching from Mathematica to MATLAB: As a text editor?

I have been using Mathematica for almost a year, and the most indispensable feature in Mathematica to me has been the ability to write really nice documents and print them into PDF or TEX files. In fact, because of the escape button feature ( i.e. $\boxed{\text{esc}}$ b $\boxed{\text{esc}}$ instantaneously prints $\beta$ and $\boxed{\text{esc}}$ un $\boxed{\text{esc}}$ […]

A limit question (JEE $2014$)

The following is a JEE (A national level entrance test) question: Find the largest value of the non-negative integer ( a ) for which: $$ \displaystyle \lim_{x \to 1} \left( \dfrac{-ax + \sin(x-1) + a} { x + \sin(x-1) -1 } \right)^{\dfrac{1-x}{1-\sqrt x} } = \dfrac 1 4 $$ On solving this, we get $ […]

Twilight Zelda Guardian Puzzle : Shortest Path (UPDATE: ADDED RULES)

I’m playing a video game right now and in it is a puzzle (see here). There are solutions to solving it (see here) on the Internet, but I’d like to know if this path is the shortest path (least amount of moves) possible to solve the puzzle. The rules of the game are clear from […]

Fractional oblongs in unit square via the Paulhus packing technique

Oblongs of size $ \frac{1}{1} \times \frac{1}{2}$, $ \frac{1}{2} \times \frac{1}{3}$, $ \frac{1}{3} \times \frac{1}{4}$, $ \frac{1}{4} \times \frac{1}{5}$, … have a total area of 1. $\sum\limits_{a=1}^\infty \frac{1}{a (a+1)} =1$ I believe it’s still an unsolved question whether the infinite rectangles can fit in the unit square. If it’s been solved, I’d love to see […]

A numerical evaluation of $\sum_{n=1}^{\infty}(-1)^{\frac{n(n+1)}{2}}\frac1{n!}\int_0^1x^{(n)} dx$

I would like to obtain a numerical evaluation of the series $$S=\sum_{n=1}^{\infty}(-1)^{\frac{n(n+1)}{2}}\frac1{n!}\int_0^1x(x+1)\cdots(x+n-1)\: dx$$ to five significant digits. I’ve used Mathematica, but some results puzzle me: $$\text{NSum}\left[(-1)^{\frac{n*(n+1)}{2}}*\frac{\int_0^1 \text{Pochhammer}[x,n] \, dx}{n!},\{n,1,23\}\right]=-0.530724…$$ $$\text{NSum}\left[(-1)^{\frac{n*(n+1)}{2}}*\frac{\int_0^1 \text{Pochhammer}[x,n] \, dx}{n!},\{n,1,24\}\right]=-0.298186…$$ Any help is welcome.

The positive root of the transcendental equation $\ln x-\sqrt{x-1}+1=0$

I numerically solved the transcendental equation $$\ln x-\sqrt{x-1}+1=0$$ and obtained an approximate value of its positive real root $$x \approx 14.498719188878466465738532142574796767250306535…$$ I wonder if it is possible to express the exact solution in terms of known mathematical constants and elementary or special functions (I am especially interested in those implemented in Mathematica)?

How to solve integral in Mathematica?

I need matrix H. G is working, but H is just derivative?? How to obtain? g = Integrate[x^(p + q – 2*(m + n + 1)), {x, -1, 1}]; h = Integrate[D[x^(p + q – 2*(m + n + 1)), {x, 2}], {x, -1, 1}]; c[r_, n_] := ((-1)^n (2 r – 2 n – […]

Plot of x^(1/3) has range of 0-inf in Mathematica and R

Just doing a quick plot of the cuberoot of x, but both Mathematica 9 and R 2.15.32 are not plotting it in the negative space. However they both plot x cubed just fine: Plot[{x^(1/3), x^3}, {x, -2, 2}, PlotRange -> {-2, 2}, AspectRatio -> Automatic] http://www.wolframalpha.com/input/?i=x%5E%281%2F3%29%2Cx%5E3 plot(function(x){x^(1/3)} , xlim=c(-2,2), ylim=c(-2,2)) Is this a bug in […]