Questions tagged [equation-solving]

763 questions
1
vote
1 answer

Iteration in Matlab

I want to solve some iteration in chemical engineering problem using matlab. So the problem that I want to solve is Calculating the inter convertion of series adiabatic reactors, here is the algorithm given: Algorthm in reactor 1 Algorithm in…
1
vote
1 answer

Solving an equation containing absolute value, with python 3

I'm trying to solve the following equation, with python 3.6.3: I did from sympy import * x = Symbol('x', real=True) solve(abs((abs(x**2-1)-x))-x) but I get the following message: Traceback (most recent call last): File "", line 1, in…
Luo Kaisa
  • 147
  • 5
1
vote
0 answers

Symbolically solving equation for a given variable in Maxima

I can solve an equation using Maxima by using the commands below. kill(all); A:A; phase:phase; solve(A*cos(2*pi*f*t+phase)=y,phase); And it gives me the correct answer. phase=acos(y/A)-2*f*pi*t But when I try and solve for just the top portion of…
Rick T
  • 3,349
  • 10
  • 54
  • 119
1
vote
0 answers

Solving system of linear equations in a subclass using inherited variables

I am trying to solve a system of linear equations in a subclass using inherited variables from multiple parent classes. The system contains 4 equations and 4 unknowns. Without including the long equations of what I'm working with, f(variable) means…
1
vote
0 answers

Zeroes of a Function in a Range in PARI/GP

I'm trying to find the zeroes of functions within the range [0,1]. My functions are generally looking something like this: F(t)=2*sin(8*Pi*t)+2*sin(2*Pi*t)-1 The naive method I've tried so far is getting a very crude plot of the function into Pari,…
Mystery_Jay
  • 161
  • 5
1
vote
1 answer

Restricting domain of solution set when using SymPy solve in the multiple variables case

Say, I'm trying to solve the system of equations: for θ, λ and ɸ , where a, b, c and d are complex numbers and the matrix on the LHS is a unitary matrix. The SymPy code I have at hand does successfully do the job but there are a few edge cases it…
user10648668
1
vote
2 answers

Find maximum value of a function for a constrained boundary variable using Matlab or Matlab symbolic tool?

I am currently solving equations and I need to find the maximum value of a function. The equation is v = sqrt(u^2+2*a*s); where 0.1 <= a <= 1.5 and u = 2.75; s = 3.194; I have to solve a sequence of equations where each time I have one variable…
1
vote
1 answer

Solve complex matrix equation

I have a complex equation involving matrices: R = expm(X)*A + (expm(X)-I)*inv(X)*B*U; where R, B and U are known matrices. I is an identity matrix. I need to solve for X. Is there any way to solve this in MATLAB?
1
vote
2 answers

Solve a Quadratic Equation in two variables using Python

I have got two equations, one linear say, , where m and c are constants and the other quadratic say, , where x1, y1 and r are constants. Is there a way I can solve for x and y using Python ? I could solve them on pen and paper finding the…
Anuradha
  • 1,089
  • 4
  • 18
  • 29
1
vote
4 answers

Which algorithm to solve a system of equations where variables are bits and operation is xor?

I'm trying to solve a system of equations. Each equation is in the form: V1 xor V2 xor ... xor Vx = Sx Vx and Sx are single bits variables. The Sx are known and I need to find the value of all the Vx ex: V1 xor V2 xor V3 = 1 V1 xor V2 = 0 V2 xor…
Gary Poc
  • 63
  • 3
1
vote
0 answers

Wolfram Mathematica Solve command for a nonlinear system of equations

I am trying to solve a nonlinear system of equations by using the Solve (and NSolve) command, but the evaluation get stuck. For a very similar system, basically the same but with the derivatives of the equations I get no problems. I define the…
Riccardo
  • 21
  • 4
1
vote
1 answer

Solve nonlinear equation symbolically in R with `Ryacas` package or an alternative

Out of pure curiosity I'm interested if there is a function/package that allows to solve simple nonlinear equations in R? Let's say I want to (symbolically) solve 0 = C + 1/x^2. The expected result for the above example is x = sqrt(-1/-C) I tried…
symbolrush
  • 7,123
  • 1
  • 39
  • 67
1
vote
1 answer

Solve a system of boolean equations in Matlab

I have a set of boolean equations, i.e. var1 = x AND y var2 = x OR z var3 = ... var4 = ... And the constraint that every output vari should equal 1. I want every corresponding combination of input variables (x, y ,z ...) which satisfies these…
EagleOne
  • 541
  • 1
  • 10
  • 28
1
vote
0 answers

How to solve function f(x,y) for either x or y (if the other is given)?

I started to work with mathjs and tried to rewrite some Python code using sympy for algebraic calculations. I implemented a fit function I got from a research article (see link in code snippet if interested) in code and need to rearrange/solve that…
albert
  • 8,027
  • 10
  • 48
  • 84
1
vote
1 answer

Solve simultaneous equations using Ryacas package (OldSolve) in R

I am trying to solve a system of 3 equations using Ryacas package in R. library(Ryacas) yacas("OldSolve({(f*Reg/(k + Reg)) - r*BB - ab * BB - a1*f1*BB*AA*P - fp*BB*P==0,(ab * BB + a1*f1*BB*AA*P)/e1 - m1 * AA == 0, (fp * BB * P)/ep - f1*AA*P - mp *…
Rspacer
  • 2,369
  • 1
  • 14
  • 40