Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
fsolve and scaling

Subject: fsolve and scaling

From: toms Seidel

Date: 28 Mar, 2011 23:12:03

Message: 1 of 2

Hello!

Currently I got to solve a system of two nonlinear equations with two variables whose magnitudes vary dramatically.

In fact my system looks like the following:

int(1/(x1-x2*A(y)), y, -B(x1, x2),-B(x1, x2)) - C1 = 0
int(1/(x1-x2*A(y))*A(y), y, -B(x1, x2), -B(x1, x2)) - C2 = 0

x1, x2 are the paramters to be determined, A(y) is a smooth function that has a finite upper bound (< 10) and is always > 0. The cases I am interested in deal with an x1 of approx. 1e20 and a x2 of approx. 1e0-1e2. The bounds of the integral also depend on x1 and x2 and have a magnitude of 1e6-1e10. C1 and C2 are about 1e-14.

Do you have any idea which kind of transformation I can apply to so that this system is not that badly scaled. Any reading recommendations are also welcome. I have already read http://www.mathworks.com/help/toolbox/optim/ug/br44iv5-1.html#br53duy-1 but can't really figure out how to do it in my case - trying with D = diag([1e-10, 1e8]) didn't help but maybe I am simply missing the point of this transform ...

Subject: fsolve and scaling

From: toms Seidel

Date: 29 Mar, 2011 07:26:03

Message: 2 of 2

"toms Seidel" wrote in message <imr4k3$ec2$1@fred.mathworks.com>...
> [...]
> int(1/(x1-x2*A(y)), y, -B(x1, x2),-B(x1, x2)) - C1 = 0
> int(1/(x1-x2*A(y))*A(y), y, -B(x1, x2), -B(x1, x2)) - C2 = 0
> [...]
I just noticed that a small type error was introduced here. Of course these lines should read as (signs changed in front of the upper bounds of the Integral)

int(1/(x1-x2*A(y)), y, -B(x1, x2),B(x1, x2)) - C1 = 0
int(1/(x1-x2*A(y))*A(y), y, -B(x1, x2), B(x1, x2)) - C2 = 0

Any help still highly appreciated

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us