questions about solving equations in scipy

F

fdu.xiaojf

Hi all,

I have two questions about scipy.

1) When I was trying to solve a single variable equations using scipy, I
found two methods: scipy.optimize.fsolve, which is designated to find the
roots of a polynomial, and scipy.optimize.newton, which is used for Scalar
function root finding according to the help().

I have tried both, and it seemed that both worked well, and fsolve ran
faster.

My questions is, which is the right choose ?

2) I have to solve a linear equation, with the constraint that all
variables should be positive. Currently I can solve this problem by
manually adjusting the solution in each iteration after get the solution
bu using scipy.linalg.solve().

Is there a smart way ?

Thanks in advance.

Xiao Jianfeng
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top