Questions tagged [equation-solving]
763 questions
4
votes
0 answers
Solving systems of non-linear equations with two unknown coefficients a and b (scalars or vectors solutions ?)
I have systems of non-linear equations and I am looking for getting the two unknown "a" and "b" of the problem ( for the moment, I don't know if "a" and "b" could be only vectors or matrix solutions or maybe only scalars).
The difficulty is that my…
user1773603
4
votes
1 answer
How do you define a second derivative in the Python GEKKO module?
I want to solve a second order differential equation with GEKKO. In the documentation there is only an example that shows you how to solve a first order equation. I can't figure out how to write the second derivative of y to make it work.
This is…

Samuel
- 41
- 3
4
votes
1 answer
How to find the unique solution to norm(a,2)==c; when c is a scalar and a=[x abs(1/x);x+1 1/x]
I am trying to find the unique solution to the following equation using Matlab
norm(a,2)=0.11
when x is a variable and a=[x abs(1/x);x+1 1/x]. b is the exact formulation of norm(a,2), which I have gained:
syms x
a=[x abs(1/x);x+1…

eli
- 87
- 5
4
votes
0 answers
Solve simultaneous equations in R with variables
I need to solve a system of four equations and solve for (Alg,Blg,C,D)..the others are simply variables.
dAlg = (ab*D + a1*f1*D*Alg*Blg + a2*f2*D*Alg*C)/e1 - m1*Alg;
dBlg = (f11*D*Blg)/eB - f1*Alg*Blg - mp*Blg;
dC = (f22*D*C)/eC - f2*Alg*C -…

Rspacer
- 2,369
- 1
- 14
- 40
4
votes
3 answers
Solving a non-linear system of equations in Python using Newton's Method
I am trying to solve this exercise for College. I have already submitted the code bellow. However, I am not completely satisfied with it.
The task is to build an implementation of Newton's method to solve the following non-linear system of…

Pedro Delfino
- 2,421
- 1
- 15
- 30
4
votes
1 answer
How to solve equations with symbolic coefficients and noncommutative variables in SymPy?
I want to solve quite simple equations with symbolic coefficients:
from sympy import *
a, b = symbols('a b', commutative=False)
x = IndexedBase('x')
basis = [a, b, a * b - b * a]
el = b * a - a * b
coefs = [x[k] for k in range(len(basis))]
eq = el…

homocomputeris
- 509
- 5
- 18
4
votes
3 answers
Visualizing Level surfaces
I'm trying to develop a level surface visualizer using this method (don't know if this is the standard method or if there's something better):
1. Take any function f(x,y,z)=k (where k is constant), and bounds for x, y, and z. Also take in two grid…

helloworld922
- 10,801
- 5
- 48
- 85
4
votes
0 answers
Sympy Solveset Multi Variable Non-Linear Solutions
I am having a bit of trouble with Sympy's solveset. I am trying to use Sympy to find a solution to an basic circuit analysis question involving three unknown resistors and two equations. I realize that I will have to guess at the value of one of the…

Foggy
- 383
- 2
- 12
4
votes
1 answer
Solving a system of equation with Sympy, python2.7
I want to solve a system of equations. But I want to be able to precise the value to "get", and as a function of "what".
To better understand, I take an exemple from here, wich I modfified:
import sympy as sp
x, y, z = sp.symbols('x, y, z')
rho,…

Agape Gal'lo
- 687
- 4
- 9
- 23
4
votes
1 answer
Is there a better way to generate all equal arithmetic sequences using numbers 1 to 10?
Problem:
The numbers from 1 to 10 are given. Put the equal sign(somewhere between
them) and any arithmetic operator {+ - * /} so that a perfect integer
equality is obtained(both the final result and the partial results must be
…

Zoltan Ersek
- 755
- 9
- 28
4
votes
2 answers
Finding real roots of quartic equation using ferrari's method
I am currently trying to solve a quartic equation using Ferrari's method from Wikipedia. I want to retrieve only the real roots, discarding the imaginary one. My implementation does not return the good value for real roots. I can't find the mistakes…

MiniW
- 193
- 13
4
votes
3 answers
Solve mixed equation in one variable
I have this equation and want to solve it for v. I tried Mathematica but it is not able to do it. Is there any software, language capable of solving it?
Equation:
Solve[1 + 0.0914642/v^5 - 1.87873/v^4 + 96.1878/v^2 - (
17.3914 E^(-(0.0296/v^2))…

user3355508
- 61
- 2
4
votes
2 answers
scipy.optimize: faster root finding over 2D grid
I wrote some code using scipy to find the root the following equation:
def equation(x, y):
return (x / y) * np.log((a * x / b) + 1.0) - 2.0 * c * c
with a, b, and c scalars.
I have values for y on a rectangular grid (say Y, shape 300x200), and…

Jahfet
- 279
- 4
- 11
4
votes
3 answers
Java calculator with multiple operations
I have the following so far which works fine. Im sure there is probably an easier way to do this but what I will need to change/alter is the top method of Matheq. The Math method does the single math operations.
The it does work with any single…

itgeek25
- 203
- 2
- 7
- 18
3
votes
3 answers
Strrep not working in Matlab to make String into function
Hello I am new to MATLAB , I wanted to know how can I make my string into function . I want to access the function as a string from user in standard Matlab format (e.g exp(-10*X)-sin(pi*X)-2*tanh(X) ) Here X is the variable. Then I want to replace…

user841852
- 197
- 3
- 7
- 15