Questions tagged [equation-solving]

763 questions
2
votes
3 answers

How to solve multivariate equation systems programmatically?

I am trying to solve a system of multivariate equations, which are the result of some Java code. Neither the form, nor the number of variables is known before runtime. An example would be (I) (e-a*d*e-b*d*e+2*b*d*f+2*b*d*e*g)/(-1+a*d+b*d)+f ==…
2
votes
1 answer

Solving linear equation with Gauss-Seidel method gives wrong results

Using R package optR for solving linear equation gives incorrect results for gauss-seidel method. I tried solving with different methods and it looks ok. For instance solve or using optR but with method gauss. Example is here. Or am I doing…
K.I.
  • 759
  • 1
  • 11
  • 30
2
votes
2 answers

Solve underdetermined system of equations in matlab

I have a system of under-determined linear equations Ax = b (i.e. more unknowns than equations) that I would like so solve in matlab. I know that this would usually mean an infinite number of solutions, but I also know the solutions should be…
falcs
  • 499
  • 2
  • 8
  • 25
2
votes
1 answer

Different solution in Matematica and Python

This is another "my-results-doesn't-match-wolfram-website question". I recently decided to give a try to python (I'm not sure why, to be honest, I'm spending too much time of my research in learn something which I don't know if I will use...…
Ger
  • 349
  • 2
  • 16
2
votes
1 answer

Mathematica Issue: solving matrix equation AX=\lambdaBX Symbolically

I'm new to Mathematica, and I'm trying to solve a matrix equation in a form as AX = \lambda BX Here, Aand B are 4*4 matrices in the following, \lambda is a value, Xis the eigenvector- 4*1 matrix. A = {{a1 + b1, c, d, f}, {c, a2 + b2 , f ,…
Mike22LFC
  • 987
  • 9
  • 15
2
votes
1 answer

Solving in a efficient way a symbolic linear system of equations on MATLAB/Maple/etc

Basically I have a linear system of equations, where every coefficient is a variable. For example, for a 2x2 system: a11*x1 + a12*x2 = f1 a21*x1 + a22*x2 = f2 x1, x2 = .... (symbolic expression with a11, a12, a21, a22, f1, f2) I tried solving it…
user3199900
  • 141
  • 2
  • 6
2
votes
1 answer

The D+J programming challenge from Kattis

The problem is as follows: Dick is d=12 years old. When we say this, we mean that it is at least twelve and not yet thirteen years since Dick was born. Dick and Jane have three pets: Spot the dog, Puff the Cat, and Yertle the Turtle. Spot was s…
Giggs
  • 51
  • 5
2
votes
1 answer

Choose which variable to solve for (Python root finding using fsolve)

Scipy offers many useful tools for root finding, notably fsolve. Typically a program has the following form: def eqn(x, a, b): return x + 2*a - b**2 fsolve(eqn, x0=0.5, args = (a,b)) and will find a root for eqn(x) = 0 given some arguments a…
IanRoberts
  • 2,846
  • 5
  • 26
  • 33
2
votes
1 answer

Find function equation out of value table

I have a table with 1000s of x- and y-coordinates. Which is the fastest way to find a matching function equation? The table looks like this: t - y 0 - 0.3113 1 - 0.5493 2 - 0.7190 3 - 0.6474 4 - 0.9200 5 - 0.2467 6 - 0.8068 7 - 0.5910 8 - 0.8302 9 -…
user6121272
2
votes
1 answer

LAPACK dgetrs vs dgesv

In LAPACK documentation, dgesv Solves a general system of linear equations AX=B. dgetrs Solves a general system of linear equations AX=B, AT X=B or AH X=B, using the LU factorization computed by DGETRF. What is the difference ? Also, I made…
maverick
  • 83
  • 3
  • 10
2
votes
1 answer

How to use optaplanner to solve a nonlinear constrained multivariable equation - Java

I want to solve a nonlinear multivariable equation with discrete values like this one: x*y + z + t - 10 = 0 with constraints: 10 < x < 100 etc.. I did some research and I believe optaplanner is the way to go. I downloaded the package from their…
dirac
  • 309
  • 1
  • 9
2
votes
1 answer

Solve set of modular equations in C++

I am working on Quadratic Sieve algorithm in c++. And after Gaussian elimination I need to solve set of modular equations such as, for example : (1) b + c = 0 mod 2 (2) a + c = 0 mod 2 Here the symbol = is used to mean "is congruent to". I am…
niar_q
  • 153
  • 9
2
votes
2 answers

Height of a full binary tree

How to solve below equation for the height of a full binary tree, which contains n number of nodes? n=2^(h+1)-1 I got the answer as, n = 2^(h+1)-1 n+(-2^(h+1)+1) = 2^(h+1)-1 + (-2^(h+1)+1) n-2^(h+1)+1 = 0 h =…
Nim
  • 95
  • 2
  • 9
2
votes
1 answer

Chopping the result of matlab or exact the reals

I have a question about solving quartic equation in MATLAB, please see here The MATLAB function shown as below: MATLAB function [res] = solveQuartic(a, b, c, d, e) p = (8*a*c - 3*b^2)/(8*a^2); q = (b^3 - 4*a*b*c + 8*a^2*d)/(8*a^3); delta0 =…
xyz
  • 413
  • 2
  • 19
2
votes
1 answer

How To Find Complex Roots of A Multivariate Polynomial Equation System (Python)

Consider following equation system: 1623.66790917 * x ** 2 + 468.829686367 * x * y + 252.762128419 * y ** 2 + -1027209.42116 * x + -301192.975791 * y + 188804356.212 = 0 11154.1759415 * x ** 2 + 31741.0229155 * x * y + 32933.5622632 * y ** 2 +…