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:
symbolic integration issue

Subject: symbolic integration issue

From: babak yazdanpanah

Date: 3 May, 2010 14:33:22

Message: 1 of 4

hi,
I had written a code that has a symbolic integration in it.
the problem is that when i input more than '4' , for k,MATLAB sends me an answer that is useless for me or in another word i cant use that symbolic answer for the other calculations of my code.try it.here is that part of my code that i mentioned at the top:
syms n tt g
h=.01;
Tm=3;
k=input('please specify the volume fraction:');
KAm=17;
KAc=29;
KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm;
o=int(1/KAn,g,-h/2,n);
disp(o)
please help me for God's sake...it is so urgent...please please please....

Subject: symbolic integration issue

From: Torsten Hennig

Date: 3 May, 2010 14:53:32

Message: 2 of 4

> hi,
> I had written a code that has a symbolic integration
> in it.
> the problem is that when i input more than '4' , for
> k,MATLAB sends me an answer that is useless for me or
> in another word i cant use that symbolic answer for
> r the other calculations of my code.try it.here is
> that part of my code that i mentioned at the top:
> syms n tt g
> h=.01;
> Tm=3;
> k=input('please specify the volume fraction:');
> KAm=17;
> KAc=29;
> KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm;
> o=int(1/KAn,g,-h/2,n);
> disp(o)
> please help me for God's sake...it is so
> urgent...please please please....

Then use quad to integrate numerically.

Best wishes
Torsten.

Subject: symbolic integration issue

From: babak yazdanpanah

Date: 4 May, 2010 07:14:06

Message: 3 of 4

Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <73101288.63686.1272898442938.JavaMail.root@gallium.mathforum.org>...
> > hi,
> > I had written a code that has a symbolic integration
> > in it.
> > the problem is that when i input more than '4' , for
> > k,MATLAB sends me an answer that is useless for me or
> > in another word i cant use that symbolic answer for
> > r the other calculations of my code.try it.here is
> > that part of my code that i mentioned at the top:
> > syms n tt g
> > h=.01;
> > Tm=3;
> > k=input('please specify the volume fraction:');
> > KAm=17;
> > KAc=29;
> > KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm;
> > o=int(1/KAn,g,-h/2,n);
> > disp(o)
> > please help me for God's sake...it is so
> > urgent...please please please....
>
> Then use quad to integrate numerically.
>
> Best wishes
> Torsten.
thank you for your attention.the problem is that i want the result in a symbolic form based on the symbolic variable'n',so i could use this answer in other parts of my code.

Subject: symbolic integration issue

From: Walter Roberson

Date: 4 May, 2010 08:20:31

Message: 4 of 4

babak yazdanpanah wrote:
> Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message
> <73101288.63686.1272898442938.JavaMail.root@gallium.mathforum.org>...

>> > the problem is that when i input more than '4' , for
>> > k,MATLAB sends me an answer that is useless for me or
>> > in another word i cant use that symbolic answer for
>> > r the other calculations of my code.

:
>> > syms n tt g
 >> > h=.01;
>> > Tm=3;
>> > k=input('please specify the volume fraction:');
>> > KAm=17;
>> > KAc=29;
>> > KAn=(KAc-KAm)*((2*g+h)/(2*h))^k+KAm;
>> > o=int(1/KAn,g,-h/2,n);
>> > disp(o)

> the problem is that i want the result in a
> symbolic form based on the symbolic variable'n',so i could use this
> answer in other parts of my code.

You have not specified whether k (the input) will be an integer or not.
If it is, then I don't know if MuPad would be able to solve it, but it
would be possible in Maple up to k=20.

For each integer k from 5 to 20, the form of the Maple symbolic
integration involves an unevaluated root of degree k, with the
polynomial being of the form A*x^k-1 = 0, with A being a positive
integer. This problem is isomorphic to the task of finding the k complex
roots of unity, which there is of course a general formula for. Thus, it
is possible to pull apart the expression to locate the RootOf expression
and to generate the complex roots of it, and substitute those back into
the integral.


But that's Maple; I do not have the Matlab MuPAD symbolic toolbox to see
what kind of expression is returned "that is useless for me". Saying
something is "useless for me" is useless for *us* unless you clarify
what was returned and why it is not usable. Examples are good.

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