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:
Problems in finding an analytical solution

Subject: Problems in finding an analytical solution

From: Alex Liles

Date: 25 Nov, 2009 13:48:07

Message: 1 of 3

Hello everybody,
I am a newbie in using Matlab and i have faced a problem i haven't been able to overcome so far,so i decided to share it with you.
I would like to solve the following equation in Matlab:

(-2*t /T^2)*(1-(1-1/Go)*exp(int(Pin(t)dt)/U))-(1-1/Go)*exp(int(Pin(t)dt)/U)*exp(-t^2/T^2)*(1/U)=0

legend:
-t,T,U,Go are (symbolic) variables

-int is not a Matlab function.It just means integral.In this case it's integral of Pin(t)dt.

-Pin(t)=exp(-t^2/T^2)

-the form in which the equation is given is not suitable for Matlab use.I just tried to write it accuratelly in a form that would be understood by anyone who is even a bit familiar with programming.


I am trying to find an analytical soluion for t (t=......) from this equation and i would like to do that in Matlab.
I have already tried solve() which can't handle exp and int appropriatelly(due to the fact that they are non-linear.I tried to approach them by using 2nd degree Taylor series,but then again problems pop up in other points...).I also tried to use fsolve(),but rather unsuccessfully...i wasn't able to make it produce a result.


So...i would appreciate it a lot,if somebody helped my in finding a solution.
Thanks a lot in advance.
Sorry for my bad english...I am just not so used to use english mathematical terminology.
Best regards,
Alex.

Subject: Problems in finding an analytical solution

From: Gavrilo Bozovic

Date: 25 Nov, 2009 13:57:04

Message: 2 of 3

"Alex Liles" <alekliles@yahoo.gr> wrote in message <hejcin$39n$1@fred.mathworks.com>...
> Hello everybody,
> I am a newbie in using Matlab and i have faced a problem i haven't been able to overcome so far,so i decided to share it with you.
> I would like to solve the following equation in Matlab:
>
> (-2*t /T^2)*(1-(1-1/Go)*exp(int(Pin(t)dt)/U))-(1-1/Go)*exp(int(Pin(t)dt)/U)*exp(-t^2/T^2)*(1/U)=0
>
> legend:
> -t,T,U,Go are (symbolic) variables
>
> -int is not a Matlab function.It just means integral.In this case it's integral of Pin(t)dt.
>
> -Pin(t)=exp(-t^2/T^2)
>
> -the form in which the equation is given is not suitable for Matlab use.I just tried to write it accuratelly in a form that would be understood by anyone who is even a bit familiar with programming.
>
>
> I am trying to find an analytical soluion for t (t=......) from this equation and i would like to do that in Matlab.
> I have already tried solve() which can't handle exp and int appropriatelly(due to the fact that they are non-linear.I tried to approach them by using 2nd degree Taylor series,but then again problems pop up in other points...).I also tried to use fsolve(),but rather unsuccessfully...i wasn't able to make it produce a result.
>
>
> So...i would appreciate it a lot,if somebody helped my in finding a solution.
> Thanks a lot in advance.
> Sorry for my bad english...I am just not so used to use english mathematical terminology.
> Best regards,
> Alex.

All of the methods that you tried are intended for finding numerical approximations of your function, none can possibly find an analytical solution.

To find an analytical solution to your equation, I'd suggest passing to Mathematica or Maple, which are built for symbolic calculation.

Alternatively, some paper and a pencil can also do the trick ;)

Subject: Problems in finding an analytical solution

From: Steven Lord

Date: 29 Nov, 2009 01:09:21

Message: 3 of 3


"Alex Liles" <alekliles@yahoo.gr> wrote in message
news:hejcin$39n$1@fred.mathworks.com...
> Hello everybody,
> I am a newbie in using Matlab and i have faced a problem i haven't been
> able to overcome so far,so i decided to share it with you.
> I would like to solve the following equation in Matlab:
>
> (-2*t
> /T^2)*(1-(1-1/Go)*exp(int(Pin(t)dt)/U))-(1-1/Go)*exp(int(Pin(t)dt)/U)*exp(-t^2/T^2)*(1/U)=0
>
> legend:
> -t,T,U,Go are (symbolic) variables
>
> -int is not a Matlab function.It just means integral.In this case it's
> integral of Pin(t)dt.

INT is part of Symbolic Math Toolbox, and is what you use to compute the
integral of a symbolic expression.

> -Pin(t)=exp(-t^2/T^2)
>
> -the form in which the equation is given is not suitable for Matlab use.I
> just tried to write it accuratelly in a form that would be understood by
> anyone who is even a bit familiar with programming.
>
>
> I am trying to find an analytical soluion for t (t=......) from this
> equation and i would like to do that in Matlab.
> I have already tried solve() which can't handle exp and int appropriatelly

There's no guarantee that there _is_ an analytical solution for t, but if
there is SOLVE is the function you'd want to use to find it.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

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