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:
Integration within solving for non-linear equation

Subject: Integration within solving for non-linear equation

From: Amisha Shah

Date: 31 May, 2010 03:12:07

Message: 1 of 2

Dear Community,

I currently have a non-linear equation which includes an integral and would like to solve for x.

For example (in real situation, eqn can't be solved algebraically):

x = x^2+integral of x*y dy from 0 to 1

I would then like to solve for x using lsqnonlin, but I'm currently unsure of how to code for the integral. Will integrating symbolically work?

Please help!

Thank you!

Subject: Integration within solving for non-linear equation

From: Walter Roberson

Date: 31 May, 2010 03:59:46

Message: 2 of 2

Amisha Shah wrote:

> I currently have a non-linear equation which includes an integral and
> would like to solve for x.

> For example (in real situation, eqn can't be solved algebraically):

> x = x^2+integral of x*y dy from 0 to 1

integral in x*y dy over a range would treat x as a constant and be x *
integral(f(y) dy) over the range. The above could thus be rewritten as

x^2 + x * ( integral( f(y) dy over 0 to 1 ) - 1 ) = 0

the integral would be a constant as far as this quadratic was concerned,
so this could be solved easily.

You have asserted that this cannot be solved algebraically. If that is
true even after this rewriting, then you must be asserting that the
integral cannot be done symbolically, which would answer your question
about integrating symbolically -- if you *can* integrate symbolically
then you *can* solve the equation algebraically.

> I would then like to solve for x using lsqnonlin, but I'm currently
> unsure of how to code for the integral.

I believe someone showed you how to set this up in lsqnonlin when you
posted this question previously except with a more definite equation.

Tags for 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