linear-algebra


Solving of a linear system with parameters


I have a linear system of four equations with four variables $a,b,c,d$ and two parameters $i,h$ where equations are roughly of the form
$$a h^3 i^3 + b h^2 i^2 +c h i +d=0$$
I want to get $a,b,c,d$ in terms of $i,h$.
Is this possible in SymPy? If not, can someone recomend how to do it on some other way?
For completeness, the answer is yes, solve in Sympy solves systems of equations with parameters. An example using the equation you stated:
from sympy import *
var('a b c d i h')
eqns = [a*h**3*i**3 + b*h**2*i**2 + c*h*i + d, a+b+c+d, a-b*h*i**2 -c - d, a+b+c-h**2 - i**2]
solve(eqns, [a,b,c,d])
The first argument of solve is a list of equations, the second the list of variables to solve for. The output is a solution, presented as a dictionary:
{c: (h**2 + i**2)*(-h**4*i**5 + h**3*i**3 - 2*h**2*i**2 + h*i**2 + 1)/(h*i*(-h**3*i**4 + h**2*i**2 + h*i**2 - 2*h*i + 1)),
b: -(2*h**2 + 2*i**2)/(h*i*(h**2*i**3 + h*i**2 - h*i + 1)),
a: (-h**3*i**2 + h**2 - h*i**4 + i**2)/(h*i*(h**2*i**3 + h*i**2 - h*i + 1)),
d: -h**2 - i**2}

Related Links

Changing the LAPACK implementation used by IDL linear algebra routines?
approximate polynomial by linear inequalities
Maximization in quadratic programming using CGAL
Efficient recalculation of weighted least squares regression when weights change
How does ATLAS tuning work?
Vector direction on 3d line
hlsl dot function
How do units flow through matrix operations?
Quaternion relative error measurement
gcc 2.95 floating point linear algebra not matching gcc 4.3.2
How do I find the plane at which two hyperplanes intersect?
How can I do blind fitting on a list of x, y value pairs if I don't know the form of f(x) = y?
Projection matrix and Eigenvalue
trying to read quadratic program in cplex, get error
Generalized Eigen Values and Vectors in Eigen Library
Algorithm for solving systems of linear inequalities

Categories

HOME
sonarqube
go
facebook-oauth
object
flex
interface
owl-carousel
sublimetext
replace
switch-statement
interpolation
bing-maps
watson-conversation
alamofire
jsonpath
tput
plink
heat
do-while
jquery-ias
pagespeed
aggregation
tiki-wiki
surveymonkey
spotipy
postback
dst
cart
laravel-eloquent
card.io
hard-drive
twos-complement
google-knowledge-graph
amazon-ses
chef-solo
oracle-service-bus
android-checkbox
clang++
vaadin-charts
dynamic-linq
jboss-4.2.x
spring-integration-sftp
fclose
configurationmanager
tf
singleinstance
wpas
mouseleave
chromium-os
file-uri
signalr.client
nikeplus-api
query-by-example
turbo-prolog
false-sharing
blitline
toast
libvlc
qt5.2
fiware-monitoring
cwrsync
variadic-templates
mruby
android-vibration
wcm
ora-00904
winginx
memset
qscrollarea
high-resolution
hibernate-entitymanager
mysql-error-1044
jeromq
scringo
zope.interface
extconf.rb
lambdaj
agility.js
flex-mobile
cdonts
collectionviewsource
metaweblog
blender-2.49
cuda.net
google-wave
cardspace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App