Skip to main content
20 votes
Accepted

An efficient way to translate a triple for-loop from Matlab to Mathematica

Okay, let's focus on this snippet: ...
Henrik Schumacher's user avatar
18 votes

The Lotka-Volterra predator-prey model

The dimensional phase-space plot The analysis of the predator-prey model is incomplete without the phase-space plot. So, here it is, ...
zhk's user avatar
  • 12k
12 votes

For Loop and Sum

Anyone asking you to write For loops in Mathematica for such a problem is a dolt. Nevertheless, here's how you might do that: ...
High Performance Mark's user avatar
11 votes

How to plot trajectories of the Rossler System

You could try NDSolve then ParametricPlot3D ...
Nasser's user avatar
  • 149k
10 votes

Area of volume of revolution

r = ParametricRegion[{r Cos[ϕ], Sin[ϕ] r, Sqrt[28 r]}, {{r, 0, 21}, {ϕ, 0, 2 π}}] Area[r] 49/2 π (14 Sqrt[3] - ArcSinh[...
Rom38's user avatar
  • 5,189
10 votes

How to solve Laplace transform question for a system in Mathematica

...
rmw's user avatar
  • 1,950
9 votes

Find the square root using a recursive formula

...
Bob Hanlon's user avatar
  • 161k
8 votes
Accepted

How do I plot a Laplace transform?

Copying your exact code ...
nufaie's user avatar
  • 1,081
7 votes
Accepted

Plot: 2D potential vortex embedded in 2D uniform flow

...
David G. Stork's user avatar
7 votes
Accepted

Strange determinant result

Det[{{0, 1/v, 0, -k12/v^2}, {0, 0, 0, -1/v^2}, {k12, k01, 0, 0}, {1, 1, 1, 0}}] (* k12/v^3*) Laplace ...
Ulrich Neumann's user avatar
7 votes
Accepted

Analyze stability of equilibria using Routh-Hurwitz conditions

There are "modified Routh-Hurwitz criteria" that work directly on the Jacobian matrix that I prefer and don't seem very well known (Fuller 1968). Here's a function I wrote that uses them for up to ...
Chris K's user avatar
  • 20.3k
7 votes

How to check whether Laguerre polynomials are orthogonal?

Integrate[LaguerreL[i, x] LaguerreL[j, x] Exp[-x], {x, 0, Infinity}, Assumptions -> Element[{i, j}, Integers] && j > i > 0] 0 ...
kglr's user avatar
  • 399k
7 votes

Euler's method initial value problem — how should I plot the solution?

Euler's method to solve, plot, and compare to known solution: $y^\prime = te^{3t}-2y, \quad y(0)=0, \quad 0 \le t \le 1. $ ...
mjw's user avatar
  • 2,166
7 votes

Adams-Bashforth method implementation code review

There are typos in the code, and after minor correction we have ...
Alex Trounev's user avatar
  • 47.8k
7 votes
Accepted

Illustrating the central limit theorem

You need to generate 10000 sums of n random numbers and make a histogram of these sums. In your code you just sum up 10000 uniformly distributed random numbers 5 ...
Mathias's user avatar
  • 629
6 votes

Implicitly defined curve

First find the y values like Carl Woll proposed. ...
Akku14's user avatar
  • 17.3k
6 votes
Accepted

Rationalize number

Use Minimize with a condition that avoids the divergence to $-\infty$: Minimize[{f[x], x > 5}, x] {(-5 + 2 Sqrt[5] +...
Marius Ladegård Meyer's user avatar
6 votes
Accepted

Area of volume of revolution

It seems that f[x] is evaluating to a number. Probably you Set an OwnValues for ...
rhermans's user avatar
  • 37k
6 votes
Accepted

Infinite While loop

The crux of the matter is how n is changed on each iteration. Math Consider a multi-digit integer $n = a_1 a_2 a_3 \ldots a_N$, where $a_k$ is the $k$-th digit of ...
NonDairyNeutrino's user avatar
6 votes

How can I animate two beads each sliding on its own frictionless rail?

If there are no restrictions on r, x, then the solution is ...
Alex Trounev's user avatar
  • 47.8k
6 votes

Find the square root using a recursive formula

Here is an implementation in about as pure a recursive style as you can hope for. It is fully tail-recursive, so it has the same efficiency as an iterative implementation. ...
m_goldberg's user avatar
  • 108k
6 votes

Using the Tube function to create a torus from an equation for the curve

...
Michael E2's user avatar
  • 241k
6 votes

Recreate specific plot in Mathematica

This is a possibility for what you want: ...
Lucas Amaral's user avatar
6 votes

Euler-method implementation

In a functional style, I recommend NestList, the key trick of which is to properly define an iteration function to be used repeatedly via pure/anonymous ...
Αλέξανδρος Ζεγγ's user avatar
5 votes

Smiley Face using parametric equations

Couple of non-answers, but I hope interesting. Chernoff face So here is another non-answer with a Chernoff face diagram using the package ChernoffFaces.m. ...
Anton Antonov's user avatar
5 votes
Accepted

Smiley Face using parametric equations

...
Bob Hanlon's user avatar
  • 161k
5 votes

Parametric Curves Tangent Line

x[t_] = t^2 - t; y[t_] = t^2 + t + 1; The value of t for the point {0, 3} is ...
Bob Hanlon's user avatar
  • 161k
5 votes

Parametric Curve and Arc Length

You are missing a comma separating the equations from the varied term: ParametricPlot[{x = Sin[t] + Sin[1.5 t], y = Cos[t]} , {t, 0, 2 Pi}] Use ...
Young's user avatar
  • 7,515
5 votes

How to find $\delta$ for limit type questions

Here's general way, limited by ability of Reduce to deal with the chosen function: ...
Michael E2's user avatar
  • 241k

Only top scored, non community-wiki answers of a minimum length are eligible