[SciPy-User] Functional nonlinear equation
Sun Dec 27 08:58:10 CST 2009
On Sun, Dec 27, 2009 at 9:35 AM, Dorian <email@example.com> wrote:
> Is there any way to solve it in the functional form ?
> I do not have "mathematica" to do it.
> Thanks for the plot suggestion.
> On Sun, Dec 27, 2009 at 3:00 PM, Richard <firstname.lastname@example.org> wrote:
>> I assume , x,y,a are real variables. I would try using a contour plotting
>> program. There is probably something like that already available in
>> matplotlib. You would evaluate f(x,y) on a grid of (x,y) values and the
>> contouring program will perform an efficient search for the points in the
>> x,y plane where f = <any constant>.
>> On Dec 27, 2009, at 7:42 AM, Dorian wrote:
>> Hi all,
>> How do I solve the following functional nonlinear equation
>> f(x,y)= (-1/a^2)*(x*y)^(1/a-1)+(1/a)*x^(1/a-1)+(1/a)*y^(1/a-1) =0
>> where "a" is positive parameter.
>> If there is a way to plot f(x,y) for different values of "a"
>> it will be very appreciated.
>> Thanking you in advance
y(x) st. f(x,y) =0
I would loop over x in linspace(xl, xh)
and use scipy.optimize.fsolve or any other root finder to find y given x (and a)
The only problem is if y(x) is not a function, e.g. if f(x,y)=0
describes a circle. Maybe local starting values help tracing the
There might be other parameterizations, to get the full contour, e.g.
use the same trick as matplotlib or interpolation on a grid. The
only cases I did, had a unique y given x.
>> SciPy-User mailing list
> SciPy-User mailing list
More information about the SciPy-User