Problems in finding analytical solution in Matlab

In summary, Alex is trying to solve for t from the following equation: -(-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. However, because t is both inside and outside the error function, it will not be possible to obtain a closed-form solution.
  • #1
alexis
2
0
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.

Alex.
 
Physics news on Phys.org
  • #2
Use Mathematica :-)

But in any case the result of the integration is the error function so your variable t is both inside and outside the error function argument. So it will not be possible to obtain a closed-form solution.
 
  • #3
Thanks for the reply DaleSpam.=)
I already know what causes my problem in Matlab(presence of variable t both inside and outside the error function and exp...by the way,solve() isn't able to handle erf,since it only handles linear expressions whereas erf is recursive).
I posted this here,so that anyone who would think of something that i haven't or who would know more in using Matlab,could give me some sort of "walkthrough".
I've already used Mathematica for that and unfortunatelly it kept crashing...I take it is due to my insufficient knowledge of using it(what I've read so far in tutorials,doesn't seem to be working in action).If you know more on Mathematica and you can give me some tips,please feel welcome to.
Any further help(of any kind) would be highly appreciated.
Anyone who may deal with it,should feel free to make simplifications,such as using taylor series for a linear approach of the non-linear parts of the expression or assuming that the Gaussian palm(Pin(t))can be approached by a triangle(base=T and height=Pin max=Pin(0) for this case).
Thanks once more,
Alex.
 

1. What are some common problems encountered when trying to find analytical solutions in Matlab?

Some of the most common problems include issues with input data, incorrect use of equations or functions, and limitations of the software's numerical methods.

2. How can I troubleshoot issues with input data when using Matlab to find analytical solutions?

One way to troubleshoot input data issues is to check for errors in the data itself, such as missing values or incorrect formatting. Another approach is to use built-in functions in Matlab, such as "isnan" or "isinf", to identify and handle any problematic data points.

3. What are some best practices for using equations and functions in Matlab to find analytical solutions?

It is important to carefully review and double-check the syntax and inputs of equations and functions before running them. Additionally, using appropriate variable names and commenting your code can help with troubleshooting and understanding your solution.

4. Are there any limitations to using Matlab for finding analytical solutions?

Yes, Matlab's numerical methods have limitations when it comes to solving certain types of equations, such as those with singularities or discontinuities. In these cases, it may be necessary to use alternative software or approaches.

5. How can I improve the accuracy of my solutions when using Matlab?

To improve accuracy, it is important to choose appropriate numerical methods and adjust the parameters and tolerances as needed. It can also be helpful to compare your solution with known results or use multiple methods to validate your solution.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
999
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
939
  • Mechanics
Replies
12
Views
1K
Back
Top