13
votes
5answers
344 views

No response to an infinite limit

Trying to compute this limit, things seem to get frozen, even for hours. What would you recommend to fastly compute it? ...
3
votes
4answers
159 views

Evaluating Erf[x] in arbitrary precision

Is it possible to evaluate Erf[200] with arbitrary precision? I only get 1. as result but I would like to know if a arbitrary ...
0
votes
0answers
126 views

How to write my own interpolation method

I was comparing results of spline interpolation in Mathematica and C++/gsl-library Results of interpolation are different if I use ...
2
votes
3answers
161 views

What is the best way to write a polynomial in the Bernstein basis?

The Bernstein basis of polynomials of degree $n$ is the set of polynomials of the form $$\binom{n}{k} t^{n-k}(1-t)^k$$ where $0 \leq k \leq n$. What is the best way to transform a given polynomial ...
-1
votes
0answers
7 views

physics - swing of the pendulum [duplicate]

I should visualize a swing of the pendulum. I should write a function springmass[z, nzigzag], which visualize the spring (line) and the swinging weight (rectangle) ...
-3
votes
0answers
59 views

swing of the pendulum [duplicate]

I should visualize a swing of the pendulum. I should write a function springmass[z, nzigzag], which visualize the spring (line) and the swinging weight (rectangle) ...
0
votes
0answers
80 views

How can I make a pretzel shape using bezier curves?

I am trying to make a pretzel shape,but I cannot seem to get the loops even. Eventually, I need to make the pretzel shape loop in 3D so I need to nail the 2D concept first. Here's what I have so far. ...
1
vote
1answer
26 views

Forcing a locator button to remain on the surface of a sphere

This question may or may not be possible and might be a hard one to answer. Suppose that I have a sphere centered at the point (1,2,-1) with radius 3. Is it possible to place a locator button on the ...
12
votes
3answers
369 views

Arbitrary precision spline interpolation

Current implementation of Interpolation does not allow arbitrary precision spline interpolation. Yu-Sung Chang say here that "it is not hard to implement it ...
9
votes
5answers
320 views

How can I generate and randomly assign color to annular sectors?

How can I generate such an image and fill every annular sector with a random colour?
8
votes
2answers
502 views

Is there any fast way to solve a quadratic matrix equation in Mathematica approximately?

Let the square nonsingular matrix $M$ is a given convergent matrix. What are the best scalar values for $\alpha$ and $\beta$ (in the real numbers domain), at which the following quadratic matrix ...
2
votes
0answers
36 views

Does Mathematica have an equivalent of C's nextafter?

In C (and many other programming languages), there is a function double nextafter(double x, double y) which takes two (IEEE 754) floating-point numbers and ...
1
vote
1answer
39 views

Changing from Dashed to Solid

I have: Graphics[{ Blue, Thick, Arrow[{{0, 0}, f1}], Arrow[{{0, 0}, f2}], Red, Arrow[{{0, 0}, f1 + f2}], Dashed, Blue, Line[{{-9, 0}, {12, 0}}] }] ...
8
votes
1answer
276 views

What algorithm does Plot use to determine abscissas?

(I'm hoping this question is not hopelessly naive...) My understanding is that Plot's strategy is to generate a list of abscissas, evaluate the argument expression ...
11
votes
2answers
200 views
+50

Transform an expression to remove the singularity

I have the expression Sin[c x]/c. Clearly it is undefined at $c=0$, but that is merely a removable singularity, since $$\frac{\sin(cx)}c=x\frac{\sin(cx)}{cx}= ...
2
votes
1answer
34 views

Does Mathematica have an equivalent of Python's float.as_integer_ratio?

The Python programming language has a float.as_integer_ratio(x) function which exactly converts an IEEE 754 floating-point number into a numerator/denominator pair ...
6
votes
1answer
47 views

Undo history cleared after removing comments - bug?

If I've written some code followed by a comment, like this: x(*y*) and I remove the comment by first removing the second delimeter and then the first, my undo ...
2
votes
2answers
122 views

Gradient in a plotstyle

I'm trying to replicate the figure below. Now a nice first approach to do this is by using Mathematica, by making some kind of contourplot with circles and just add a gradient to the contourstyle. Now ...
11
votes
1answer
133 views

Regime Change Stochastic Process

I would like to simulate an Ito process in which the drift and diffusion terms change after hitting a boundary for the first time. For example, a Geometric Brownian Motion X which has 0 drift and ...
0
votes
1answer
29 views

How to reduce trigonometric expressions under special conditions

For the following problems I used "FullSimplify" and "TrigReduce" but I manage to reduce more ...
2
votes
1answer
39 views

Transformation syntax with shortcuts to a more explicit syntax for an equation

I would like to write the following code line without the signs @#%^&*?! Sequence @@ (XMLNote[#1, m] &) /@ attributes I have made this code but it seems ...
1
vote
1answer
40 views
0
votes
1answer
90 views

Replacement of terms/Pattern matching involving products of derivatives of a function

In delving into Ramanujan summation, I'm trying to get a hold of the relations of the form $$\sum_{n=0}^\infty f(n)=\dfrac{h\frac{d}{dx}}{{\mathrm{e}^{h\frac{d}{dx}}}-1}\int_{0}^\infty ...
0
votes
0answers
39 views
7
votes
2answers
1k views

Controlling the 2D $x–y$ aspect ratio of a 3D plot

I have some data representing a nested list, each element being composed of 3 real numbers like ...
1
vote
1answer
42 views

Import a jpeg file and a mov file and display them side by side

I am planning to use Mathematica for a presentation. In one of the slides I need to place a jpeg file side by side to a mov file. ...
2
votes
1answer
100 views

AutoGeneratedPackage Formatting

If you do Ctrl+Shift+o you open an option inspector. And then you can enable ...
18
votes
1answer
2k views

Animation of double pendulum

Sadly, I am a completely newbie. I am studying Physics and in our theoretical physics class we got the task to solve the double pendulum using Mathematica. We just got the program, but no introduction ...
4
votes
2answers
105 views
0
votes
1answer
44 views

Solving coupled differential equations

I'm trying to solve a pair of coupled differential equations for a spring system, but am having trouble making DSolve evaluate my equations. ...
4
votes
2answers
122 views

Improve simulation speed using Compile

I have two square matrices, a hermitian matrix h and an unitary matrix v. I am interested in the following function ...
-3
votes
0answers
50 views

Creating truth tables

Hello guys i need help about this problems: I should write module in mathematica which receive function f. Module should write on screen: -Truth table of function f -Boolean expression which contains ...
1
vote
2answers
69 views

Why doesn't Plot draw function within prescribed range?

I have a function: TheoreticalFunction[x_] = 2 / Pi * ArcSin[x] And trying to plot its derivative: ...
4
votes
1answer
148 views

Solution to $y = x^x (1-x)^{(1-x)}$ for $x$ [on hold]

Does anyone have any insight to a symbolic Mathematica solution to this equation for $x$ in terms of y? Symbolic of any sort, just not numeric. $$y = x^x (1-x)^{(1-x)}$$
0
votes
0answers
33 views

Create graph K5, delete 2 edges and 2 vertex, create adjacency matrix [duplicate]

I need help about this problem. I should create graph K5, delete 2 edges and 2 vertex from it and from the new graph create adjacency matrix. I have poor knowledge and i don't need anyone to solve the ...
3
votes
3answers
83 views

Using NDSolve within Manipulate

I'm trying to use NDSolve inside manipulate. Specifically, I have a series of differential equations with coefficients, k1, k2, ...
0
votes
1answer
39 views

Creating Matrix,Inverted and Upper Triangulate inside Module

I was trying to fit this into a module but I didn't have any luck. And for some reason it won't Inverse the Matrix. Here's the code: Input: ...
2
votes
2answers
71 views

Partial reload of definitions from package

In order to keep my code modular, I have defined some functions in "Foo.wl" file, which I source with Needs["Foo`"]. When I modify a single function in Foo, I quit ...
0
votes
0answers
39 views

Issue with combining plots using Show [on hold]

I need to combine two plots, but I can't seem to find a proper way! I tried Show, but I just get an error Show::gcomb: Could not combine the graphics objects. ...
21
votes
3answers
3k views
7
votes
2answers
312 views

How to create an adjustable Bézier curve?

I tried to create an adjustable Bézier curve with the following simple code. However the curve didn't show up. What is the problem? Please help. ...
0
votes
0answers
22 views

Recurrence equation [duplicate]

I need to print the first 10 elements from the string which is a solution of a recurrence equation. If there is a 5 in the elements of the string, then that element should not be printed. For ...
0
votes
0answers
96 views

Heuristic Method to create an uniform distribution of points

Introduction I am now trying to program an algorithm to achieve an uniform distribution of points within a space of dimension n. I started working in 2D. The idea is to achieve an uniform ...
3
votes
1answer
1k views

Convolution of two distribution functions

I have two functions; f[x_] = (1/k) Exp[-x/k] ; g[x_] = (1/p) Exp[-x/p] ; How I can convolve them? In Mathematica for convolving two functions we have this ...
6
votes
1answer
861 views

Convolving/integrating problems

Let's say I want to convolve two functions (f and g), a gaussian with a breit-wigner: ...
6
votes
2answers
321 views

Convolve does not get the correct answer

Convolve[Sinc[x], Exp[-x^2], x, X] (* E^-X^2 π *) is obviously false, but why? Any suggestions ?
2
votes
3answers
145 views

Delete rows based on specific periods

I have data (.xlsx format): two columns - data in first column imported as DateObject (dates with specific time), data in second column are numbers (113388.28, 865165.98 etc.). I want to delete the ...

15 30 50 per page