Got Questions? Get Answers.
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:
int in R2008b; wrong result?

Subject: int in R2008b; wrong result?

From: Joerg Buchholz

Date: 11 Dec, 2008 17:09:01

Message: 1 of 5

Just a simple integral in R2008b:

>> int ('exp(x)/(exp(x) + 42)')
 
ans =
 
(exp(x)*log(exp(x) - 41))/(42*(exp(x) - 42))

Using school mathematics (substitution z=exp(x)+42) I get:

log (exp (x) + 42)

I can't see that both results are identical.

Subject: int in R2008b; wrong result?

From: Tazmusica

Date: 16 Dec, 2008 20:35:04

Message: 2 of 5

"Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message <ghrhfd$ib6$1@fred.mathworks.com>...
> Just a simple integral in R2008b:
>
> >> int ('exp(x)/(exp(x) + 42)')
>
> ans =
>
> (exp(x)*log(exp(x) - 41))/(42*(exp(x) - 42))
>
> Using school mathematics (substitution z=exp(x)+42) I get:
>
> log (exp (x) + 42)
>
> I can't see that both results are identical.

It looks like there is something wrong with int here. The result returned from matlab R2008b is not equivalent to the correct answer from using high school calculus. R2008a gives the correct answer. I hope they release a patch to fix this.

Subject: int in R2008b; wrong result?

From: someone

Date: 16 Dec, 2008 21:27:02

Message: 3 of 5

"Tazmusica " <tazmusica2@deletethis.gmail.com> wrote in message <gi93do$9tq$1@fred.mathworks.com>...
> "Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message <ghrhfd$ib6$1@fred.mathworks.com>...
> > Just a simple integral in R2008b:
> >
> > >> int ('exp(x)/(exp(x) + 42)')
> >
> > ans =
> >
> > (exp(x)*log(exp(x) - 41))/(42*(exp(x) - 42))
> >
> > Using school mathematics (substitution z=exp(x)+42) I get:
> >
> > log (exp (x) + 42)
> >
> > I can't see that both results are identical.
>
> It looks like there is something wrong with int here. The result returned from matlab R2008b is not equivalent to the correct answer from using high school calculus. R2008a gives the correct answer. I hope they release a patch to fix this.

If this is indeed the case, you should file a bug report directly with MathWorks.

Subject: int in R2008b; wrong result?

From: Alan Weiss

Date: 17 Dec, 2008 13:22:05

Message: 4 of 5

someone wrote:
> "Tazmusica " <tazmusica2@deletethis.gmail.com> wrote in message <gi93do$9tq$1@fred.mathworks.com>...
>> "Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message <ghrhfd$ib6$1@fred.mathworks.com>...
>>> Just a simple integral in R2008b:
>>>
>>>>> int ('exp(x)/(exp(x) + 42)')
>>>
>>> ans =
>>>
>>> (exp(x)*log(exp(x) - 41))/(42*(exp(x) - 42))
>>>
>>> Using school mathematics (substitution z=exp(x)+42) I get:
>>>
>>> log (exp (x) + 42)
>>>
>>> I can't see that both results are identical.
>> It looks like there is something wrong with int here. The result returned from matlab R2008b is not equivalent to the correct answer from using high school calculus. R2008a gives the correct answer. I hope they release a patch to fix this.
>
> If this is indeed the case, you should file a bug report directly with MathWorks.
>

This bug has been reported, and will be fixed in a future release. Sorry
about that, folks.

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: int in R2008b; wrong result?

From: Joerg Buchholz

Date: 15 Jan, 2009 15:51:02

Message: 5 of 5

The bug has not been fixed in R2009a.

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