# Tagged Questions

Computational mathematics involves mathematical research in areas of science where computing plays a central and essential role, emphasizing algorithms, numerical methods, and symbolic methods.

0answers
33 views
+50

### Derivative of Associated Legendre polynomials at $x = \pm 1$

I'm creating meshes for spherical harmonics, and I need a normal at a given point. Whenever I'm at the poles, $\cos{\theta} = \pm 1$, and I do not know how to find the derivative there. All the ...
3answers
325 views

### Calculate $\pi$ in an arbitrary base, to arbitrary precision

I need to calculate $\pi$ -- in base: 4, 12, 32, and 128 -- to an arbitrary number of digits. (It's for an artist friend). I remember Taylor series and I've found miscellaneous "BBP" formulas, but so ...
1answer
39 views

### About parallel time computation

I am studying a paper where it is mentioned that Newton iteration may be used to compute the inverse of $n \times n$, well- conditioned matrix in parallel time $o(\log^2n)$ and that this computation ...
1answer
60 views

### Need little hint to prove a theorem from a paper

I have an iterative method \begin{eqnarray} X_{k+1}=(1+\beta)X_k-\beta X_k A X_k~~~~~~~~~~~~~~~~~ k = 0,1,\ldots \end{eqnarray} with initial approximation $X_0 = \beta A^*$ ($\beta$ is scalar ...
1answer
62 views

### Minimizing the norm related with iteration method

I am working on a iteration method to compute the generalized inverse of a matrix $A$ of rank $r$ Iteration method is $X_{k+1} = X_{k} + \beta X_{k} (I - A X_{k})$ where notations are as follows ...
1answer
133 views

### Exponential Probability Monte Carlo simulation

I need to write a Matlab program to estimate the quantity $\theta = \mathrm{Pr}(X < 1)$, where $X$ is an exponential random variable with mean $1$. I am doing this for multiple monte carlo ...
1answer
141 views

### Given two sets of vectors, how do I find a change of basis that will convert one set to another?

Given two sets of dimension $n$ vectors $\lbrace v_1 , v_2 , \ldots , v_m \rbrace$, $\lbrace u_1, u_2, \ldots , u_m \rbrace$, where $m > n$, is there a computational method (in particular, using ...
2answers
53 views

### What free software can I use to solve a system of linear equations containing an unknown?

Question: What free software can I use to solve a system of linear equations $M\mathbf{x}=\mathbf{y}$ where the entries of $\mathbf{y}$ vary with an unknown quantity $n$? Presumably I could do ...
0answers
43 views

### Simpson's rule characteristics

I just wanted to ask a quick question in regards to simpson's rule for integration. I have been reading up on the trapezoidal rule, and have found the notations and have an understanding such that: ...
2answers
97 views

### Efficient computation of $\sum_{k=1}^n \lfloor \frac{n}{k}\rfloor$

I realize there is probably not a closed form, but is there an efficient way to calculate the following expression? $$\sum_{k=1}^n \left\lfloor \frac{n}{k}\right\rfloor$$ I've noticed \sum_{k=1}^n ...
0answers
96 views

### C++ Polynomial Multiplication [closed]

\begin{eqnarray} \text{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~} \end{eqnarray}\begin{eqnarray} \text{IF YOU HAVE A QUESTION, THEN ASK AND I CAN ...
0answers
42 views

### How to find an expression whose value is 190

Given a set of numbers (in this case): 3, 7, 7, 100, 50 Either: prove it is impossible to form the number k = 190 using ( ) + - * / operators between sub set of the these numbers ex: 1000 = ((3 + ...
1answer
204 views

### Krylov-like method for solving systems of polynomials?

To iteratively solve large linear systems, many current state-of-the-art methods work by finding approximate solutions in successively larger (Krylov) subspaces. Are there similar iterative methods ...
1answer
47 views

### how can I find the following problem using laplace transform?

For example here is the problem: $(t^2 \cos{\omega t})u(t)$ I have to find it using laplace transform; here is what I think it is, I have $t^2$$(\cos{\omega t})u(t)$ which I think I can solve them ...
5answers
410 views

### What is the value of $2^{3000}$

What is the value of $2^{3000}$? How to calculate it using a programming language like C#?
0answers
46 views

### Evaluation of a slow continued fraction

Puzzle question... I know how to solve it, and will post my solution if needed; but those who wish may participate in the spirit of coming up with elegant solutions rather than trying to teach me how ...
1answer
42 views

### Matrix completion: supplementary questions

Continuation of the question here, what is going to happen if we change the some of the conditions. I write it as a quote from here and change the appropriate places which are underlined: I need ...
1answer
44 views

### How are 10-20 digit multiperfect and hemiperfect numbers efficiently computed?

This numericana item on multiperfect and hemiperfect numbers contains some impressively enormous numbers. How were these actually computed ? The associated OEIS pages (A007691 & A159907) just ...
1answer
60 views

### What is the fastest computational graph theory package?

What is the fastest computational graph theory package with respect to executing algorithms and computing graph theoretic data? I am aware of this related question, which requests graph theory ...
1answer
47 views

### How do I determine if two of my software's representation of algebraic numbers are equal?

I have software which stores information about algebraic numbers with absolute precision. If you build it up by creating instances of a Python representation of an integer, float, Decimal, or string, ...
2answers
137 views

### Sequences of a computable function

Is there any computable function $f(n)$, which given any integer $n$ has been proven to return either $0$ or $1$ in finite time, and for which the statement "$f(1), f(2), f(3),\ldots$ contains ...
2answers
37 views

### Does rationalizing the denominator lead to more or less round-off error?

I evaluated $\frac{1}{\sqrt{2}}$ and $\frac{\sqrt{2}}{2}$ in Matlab, and got a slight difference: $0.707106781186547$ and $0.707106781186548$, respectively. Which is more accurate, the one with the ...
3answers
85 views

### Drawing graphs (vertices and edges) with or without technology

Given a collection of vertices $V$ and a collection of edges $E \subseteq V\times V$, is there an algorithm or program that will allow you to draw a nice graph? The placing of the vertices is very ...
1answer
73 views

### Best graphing program for Mac or PC?

I just bought the highest end iMac, with a student discount, of course, and was wondering what is the best graphing program out there. A program that can graph any equation that I throw at it AND one ...
1answer
91 views

### Matrix completion

I need to find an algorithm (if exists) of the following matrix completion problem. I need to construct $n^2$ positive semi-definite matrices, say $\{P_i\}_{i=1}^n$. Entries of these matrices are ...
1answer
76 views

### Minimizing mean squared error

I want to find a $d$ that minimizes the value of the expression below. I think the first step is to find the derivative w.r.t. $d$ (is that correct? If not, what is the first step?). If so, I'm having ...
1answer
48 views

### Where does the input x in Turing Machine subroutines come from in solving reductions to undecidable problems?

I'm taking an introduction to computation theory class and we went over the chapter on undecidable problems and proving undecidability through reductions. I can't seem to grasp some of the simplest ...
2answers
84 views

### How to get the minimum angle between two crossing lines?

I'm not a student, I'm just a programmer trying to solve a problem ... I just need the practical way to calculate the smallest angle between two lines that intersect. The value, of course, must always ...
0answers
58 views

### Drawing finite state machines based on regular expressions

I have problems drawing the following finite state machines which use the {0,1} alphabet: Are these DFAs or NFAs? How to determine the latter? Tyvm for your time and help!
3answers
115 views

### Mathematical Limitations of Computer Experiments

One problem that has always bothered me is the limitations of computers in studying math. With a chaotic dynamical system, for example, we know mathematically that they possess trajectories that never ...
0answers
47 views

### Solving an overdetermined system of inequalities using null-space arguments

The solutions to a linear system of equations: $$A\cdot x = b$$ (where $x$ is a $(n\times 1)$ column vector, $b$ is a $(m\times 1)$ column vector and $A$ is $(m\times n)$ matrix) can all be ...
1answer
35 views

### Discrete numerical derivative with respect to d/d(n*x)

How can I generate a stencil for a d/d(n*x) operator? I am writing a program that needs a method to calculate line derivatives in an image. If we want to calculate the simplest forward derivative ...
0answers
35 views

### Qubit state finding

Suppose we have two qubits in the state $x|00\rangle+y|11\rangle$. What is the resulting state of the second qubit in that case? Use and to denote and respectively.
2answers
57 views

### Can product of all pairwise sums be computed faster than the naive method?

Let $S$ be a set of integers. $|S|=n$. Can we find the product $\prod_{a,b\in S} a+b$ faster than naively add all pairs then multiply them one by one? By faster, I mean use less than $O(n^2)$ ...
1answer
47 views

### How to find a close form expression in terms generating functions for the triple summation

Given $$\sum\limits_{i=0}^\infty a_i z^i=A(z)$$ and $$\sum\limits_{i=1}^\infty b_i z^i=B(z)$$ and $$\sum\limits_{i=0}^\infty c_i z^i=C(z)$$ Find \$\sum\limits_{i=1}^\infty\sum\limits_{j=0}^\infty a_j ...
6answers
533 views

### Fastest Square Root Algorithm

What is the fastest algorithm for finding the square root of a number? I created one that can find the square root of "987654321" to 16 decimal places in just 20 iterations (I'm not ready to release ...
1answer
33 views

### Amicable numbers

Def: a pair natural numbers $a$, $b$, $a\ne b$ are an Amicable pair if $\sum_{d|a,a\ne d}d = b$ and $\sum_{d|b, b\ne d}d = a$. Ok. So I'm trying to optimize a calculation for finding the number of ...
3answers
117 views

### Understanding recursive definitions of a language.

I am having difficulty understanding the recursive definition of a language. The problem asked how to write this non recursively. But I want to understand just how a recursive definition of a ...
0answers
36 views

### Function design and Super-Symmetry Test Requirements

I request everyone concerned to give a serious thought and respond. If you are asked to design two independent functions say S() and P() and should satisfy the following conditions: There will be ...
1answer
39 views

### Probability : Dividing a list into 2 classes

I have a list of integer numbers ($n$). I am dividing it into two parts $n_1$ (smaller) and $n_2$ (bigger) such that the length of $n_1 \ge a*n$; $a$ is positive and $a \lt 0.5$. What is the ...
1answer
99 views

### Fractional part of exp(x)

I have a real number $x$ (for concreteness, say $10^4<x<10^6$) and would like to find $e^x-\lfloor e^x\rfloor$ to reasonable precision (10-20 decimal places). What is the most efficient method? ...
1answer
158 views

### A search for integers which can be written as a sum of two squares in multiple ways

As part of a number theory hobby project, I'm looking for a computational way to enumerate all integers $n$ which can be written as a sum of two integer squares in three or more ways. The range of ...
2answers
475 views

### How to handle big powers on big numbers e.g. $n^{915937897123891}$

I'm struggling with the way to calculate an expression like $n^{915937897123891}$ where $n$ could be really any number between 1 and the power itself. I'm trying to program (C#) this and therefor ...
0answers
75 views

### How to convert a hologram into an image?

Suppose one knows in full detail the phase and intensity of monochromatic light in a plane. This is basically what a hologram records, at least for some section of a plane. By using this as the ...
0answers
201 views

### Simple Lanczos algorithm code to obtain eigenvalues and eigenvectors of a symmetric matrix

I would like to write a simple program (in C) using Lanczos algorithm. I came across a Matlab example which helped me to understand a bit further the algorithm, however from this piece of code I can't ...
0answers
67 views

### How to make normalized cross correlation robust to small changes in uniform regions

the problem is described below: Given 2 sets of data: A= { 91 87 85 85 84 90 85 83 86 86 90 86 84 89 93 87 89 91 95 97 91 92 97 101 101 }, B = {133 130 129 131 133 136 131 131 135 135 133 133 133 ...
7answers
744 views

### Rapid approximation of $\tanh(x)$

This is kind of a signal processing/programming/mathematics crossover question. At the moment it seems more math-related to me, but if the moderators feel it belongs elsewhere please feel free to ...
2answers
92 views

### Number of ways to move 1 or more elements from one list to the previous list until one list remains

Given N elements, divided into at most N groups, which are then labeled 1 thru N, move all of the elements into the group labeled 1. By moving 1 to all of the elements, in group i to i-1. This means ...
1answer
144 views

### Using sympy im Python to substitute values into a 10x10 matrix

'm using the symbolic package sympy to store a 10X10 antisymmetric matrix in terms of 10 variables. and then at every iteration step, i substitute numerical values into the entries of the matrix. ...
1answer
216 views

### Show two finite state machines are equivalent

Suppose $M_1 = \langle Q_1,S,R,f_1,g_1\rangle$ and $M_2 = \langle Q_2,S,R,f_2,g_2\rangle$ are two strongly connected machines. I need to show that $M_1 \equiv M_2$ iff there exist a state $p \in Q_1$ ...
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 77, "mathjax_display_tex": 5, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9036519527435303, "perplexity_flag": "middle"}