10
votes
2answers
275 views

Solving the magic backyard puzzle with MMA

I was trying to solve this puzzle using mma It looks like the generalization of the magic square. Anyway here my attempt:- There are four columns $(x,y,z,w)$ and nine rowa which are denoted by the ...
2
votes
4answers
125 views

Backsubstituting solution into FindRoot and Plot

I want to find roots from a transcendental equation using FindRoot as a function of a real parameter and then plot the solutions vs. the parameter. The following commands work perfectly: ...
4
votes
2answers
285 views

What is the efficient way to code Successive Over-relaxation (SOR) method in Mathematica?

I have written a SOR method (SOR is this method) code using C-style procedural loops. However, I think there might be (much) better ways to achieve the same end in Mma avoiding these loops. So my ...
0
votes
3answers
118 views

How to solve correctly inside a DO loop and then plot

Here is the corresponding code First the equations setup ...
4
votes
2answers
179 views

How to set up and minimize a large system of equations to resolve the individual components

I am trying to set up a system of 400*N equations to deconvolute spectral data for four different compounds. I monitored 400 different wavelengths in N solvents (3 solvents in this case). In order ...
0
votes
0answers
81 views
-1
votes
1answer
100 views

Plotting the results of a system of equations

I believe this is a question of more list manipulation than plotting, but I hope you could help me. I solve numerically a system of equations of 3 variables, take only real solutions where one of the ...
0
votes
1answer
71 views

Why Solve won't work for user-defined function, used for system solving? [closed]

I have a list of x-es, that I transform into a list of tx-es. Also tao is my user-defined function that I don't know the parameters of, but I do know the values I get when I put the tx-es in it. And ...
0
votes
0answers
43 views

Store results of inequality [duplicate]

I eveluated some values using Reduce commend and I store them in a Table ...
-1
votes
1answer
128 views

Efficient Table Generation & NDSolve Error

I'm currently working on solving an SEIR model with data from the CDC. I've created a function to calculate the Square difference for the model and want to create a table of values for the 4 variable ...
1
vote
0answers
37 views

How can I access numerical values of variables calculated with Solve? [duplicate]

I am trying to calculate some thermodynamical cycles so I often use lists with equations. Here's a simple example: ...
1
vote
2answers
175 views

How to pick a solution from a list of solutions using a test?

I have a list of solutions that depends on a parameter b3 and I'd like to get the solution for which the x value is minimal when ...
0
votes
0answers
63 views

Defining functions in a loop [duplicate]

I have a symbolic solution to a linear system with respect to some variables a[i,j] which depend on a parameter t. sol=Solve[...,Table[a[i,j],{i,0,n},{j,0,n}]] I ...
0
votes
1answer
117 views

How to simulate a multivariate recursive system from a list

New to mathematica, trying to use Eric Swanson's Pertubation AIM program to solve DSGE models. His code produces a solution as a list or a table. My question is how do I use this list to simulate the ...
5
votes
3answers
470 views

How do I find the intersection of a closed 3D curve given by numerical data with a specified plane?

I have a list of 3D data points which form a closed curve. My own data can't be easily generated analytically, but the qualitative behaviour is well represented by a parametric curve families such as ...
9
votes
1answer
265 views

Efficient way to solve equal sums $x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k$ with Mathematica?

I need to solve the system of equations, call it $S_1$, in the integers $$x_1x_2x_3x_4x_5 = y_1y_2y_3y_4y_5$$ $$x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k,\;\; k= 2,4,6$$ I used a very ...
0
votes
1answer
91 views

Collecting roots of different equations and create a list

I solve two equations and have two solutions one by each equation. I want to create list of these roots. Could anyone please help me? Appreciate it. m02R150 = FindRoot[P1 == 0, {E1, 0.07, 0.1}] ...
1
vote
1answer
85 views

Calibrating Precision in calculations

As the title says, I encounter an irritating problem which has to do with the accuracy or the precision used in the calculations. To be more specific, I have the following code: ...
3
votes
1answer
139 views

How can I get a single solution to a set of inequality constraints?

I have a set of constraints to which I require integer solutions. However, instead of needing all possible integer solutions (as obtained by using ...
2
votes
1answer
721 views

How to solve equations self-consistently

I want to solve the following equation self-consistently. So, H.u = e.u {{1, d}, {d, 1}}.{u1, u2} = e.{u1, u2} I guess an initial value for ...
7
votes
2answers
351 views

Finding all points of period n in an iterated map

I'm trying to implement an algorithm of Jenkinson and Pollicott to calculate the Hausdorff dimension of a Julia set for the map $f_c : z\mapsto z^2 + c$. It's described on page 40 of their paper, ...
4
votes
2answers
213 views

How can I eliminate equivalent equations from a list?

I want to find the numbers $a$, $b$, $c$, $d$ of the plane $ax + by +cz +d = 0$ which make the distance from the point $M(1,2,3)$ to the plane equal to 2. I tried ...
0
votes
1answer
162 views

Assign the result of Solve in a list [duplicate]

Possible Duplicate: Assign the results from a Solve to variable(s) I want to assign the results of a Solve command in a list. For example Solve[-((287 s^3)/50) == 0, s] returns {{s -> 0}, ...
1
vote
1answer
432 views

Using 'Reduce' to solve a set of inequalities, specified by a list

I have a two lists $LHS$ and $RHS$, both of size $n$. I want to solve a system of inequalities of the form: $$LHS[1] \leq RHS[1]$$ $$LHS[2] \leq RHS[2]$$ $$LHS[3] \leq RHS[3]$$ $$\vdots$$ ...
12
votes
2answers
933 views

How do I split up a curve into segments of equal length?

I have a curve that is defined as f[x] and what I'm attempting to do is to divide the curve into equal straight lengths for a number of segments of my choosing that I've defined as nSeg. I've created ...