Questions tagged [equation-solving]

763 questions
0
votes
2 answers

sympy solve() gives implicit/incorrect answer

I'm trying to solve an equation system with 16 equations and 16 unknowns using sympy but it doesn't seem to solve it well. I want to solve the system [K][d]=[f] where [K] is the coefficients matrix, [d] the unknowns and [f] are constants. I know…
Jack
  • 15
  • 4
0
votes
2 answers

Solve polynomial equation for x in R

This might be insanely simple, but how can I solve the following equation for x using R? X should be a real number. ((4*x)^2+(2*x)^2+(1*x)^2+(0.5*x)^2+0.25)*((1 - 0.167)/0.167) = 1
Lion Behrens
  • 199
  • 1
  • 11
0
votes
2 answers

how to get the array containing minimum difference array elements

[Image of the actual problem] we have to choose the best item/items based on input3 which is items to be selected. the choice should be such that we don't take maximum item always. Instead we take items which are not having much difference. input1:…
under dog
  • 13
  • 2
0
votes
1 answer

How to solve polynomial equation with parameter?

I have a polynomial equation in x with an additional parameter in it. My goal is to solve it with R such that I have x on one side, and the parameter terms on the other. Here is a simplified example: Now, I would like R to come up with: How to…
Joe
  • 1,628
  • 3
  • 25
  • 39
0
votes
0 answers

solveing Colebrook equation using Newton in Matlab

I make this script: This part is for creating de variables Re and Ru so, I can replace use another. Next, create the expression so MATLAB can derivate it. Re = 152788; % Reynolds Ru = 4e-05; % roughnesss syms x a b dy =…
AnesG
  • 275
  • 2
  • 17
0
votes
0 answers

solve a non-linear equation

I am solving for f(kx,ky) that satisfies following integral equation, k is vector in 2d equation: I am mapping f(kx,ky) into 2d N*N grid and solving a system of total N^2 equations. from scipy.optimize import newton_krylov import numpy as n L=10.0 …
p.s
  • 51
  • 3
0
votes
0 answers

Matlab can't seem to solve higher-order equation for variable?

I am experiencing a weird error in Matlab that is not prone to being solved with internet research, and it comes up when trying to solve the following equation for the variable, S: -(W-S)^(y-1) + d*p*(1+f+w1*(r1-f))^y + d*(1-p)*(1+f+w1*(r2-f))^y ==…
Coolio2654
  • 1,589
  • 3
  • 21
  • 46
0
votes
1 answer

GAMS: retrieve information from solution

GAMS: I think I have a pretty simple question, however I'm stuck and was wondering if someone could help here. A simplified version of my model looks like this: set(i,t) ; parameter price D; variable p(i,t) …
ima
  • 155
  • 12
0
votes
0 answers

Bounds check error when using NLsolve

I want to solve the below system of NL equations using NLSolve. using NLsolve function f!(x, fvec;…
ludo
  • 35
  • 9
0
votes
1 answer

Solving a nonlinear system of matrices using Mathematica

I am trying to find solutions to nonlinear systems of matrix equations with Mathematica. The solution space is too complicated to try to use Solve, and thus I have tried to use FindInstance. Here is this simplest example of a nonlinear system that I…
Hunter Vallejos
  • 131
  • 1
  • 5
0
votes
2 answers

solving one equation with 2 unknowns to obtain a specific range of possible answers in R

Suppose in equation (1) below, d = .99. Also, sd = 1.2. Desirably, 5+(.1*5) <= m1 <= 5+(.5*5), and 5 <= m2 <= 5+(.3*5) Equation (1): d = (m1-m2) / sd Question There surely are many possible answers for m1 and m2. But in R, how can I obtain the…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72
0
votes
1 answer

Solving Coupled pde in comsol

Does anyone know which module in comsol should I use to solve below equations? $partial_t u1 = -a1 \div ((cos(s), sin(s)) u1) + a2 \div (u1 \grad (u2) )+ a3 \partial_s ((-sin(s), cos(s)) \cdot \nabla c u1) + a4 \nabla^2 u1+a5 \nabla^2 u1+a6…
0
votes
1 answer

desolve differential equations not working

I've written some code that has a logistic growth component (i.e. as N approaches the 'carrying capacity' it grows at a slower rate, until when it reaches the 'carrying capacity' it stops growing). However, when I run it in R it doesn't seem to be…
unknown
  • 853
  • 1
  • 10
  • 23
0
votes
1 answer

Solving a complex double-integral equation for a third variable

I'm trying to solve the following equation for the variable h: F is the normal cumulative distribution function f is the probability density function of chi-square distribution. I want to solve it numerically using Matlab. First I tried to solve…
0
votes
2 answers

Solving for variables if you have the equation and variables using Python

If I have an equation, (a + (b - c) d - e) f = 75, how can I iterate through changing my variables a thru f? If a thru f are unique numbers [1,6], then there would be 6! ways of placing the numbers, right? So I imagine I have to increment through my…
geominded
  • 201
  • 2
  • 10