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:
How to solve transecedental equation using matlab

Subject: How to solve transecedental equation using matlab

From: vinneelaero@gmail.com

Date: 14 Feb, 2009 09:55:57

Message: 1 of 6

Hi friends.....
    when i was doing a vibration problem i got a equation tanh(ax)+tan
(ax)=0, which is a transecedental equation....i want the roots of this
equation..... could any body help me to find out the roots of this
equation by using matlab

Subject: How to solve transecedental equation using matlab

From: Matt Fig

Date: 14 Feb, 2009 17:22:01

Message: 2 of 6

You could use fzero to find the roots one at a time. This will find many at a time:

http://www.mathworks.com/matlabcentral/fileexchange/6924

a = 2;
f = @(x) tanh(a*x) + tan(a*x);
rt = newtzero(f);
xx = -20:.1:20;
plot(xx,f(xx),'b',rt,f(rt),'*r');
ylim([-1 1])
xlim([min(xx) max(xx)])





cadz\U`bUYUsj_ic\sY.sczis\hcWh"U]s`aV4cWms[UVsb]UY9dshcYMAU

Subject: How to solve transecedental equation using matlab

From: Roger Stafford

Date: 14 Feb, 2009 20:07:02

Message: 3 of 6

vinneelaero@gmail.com wrote in message <3e609bfa-176d-4203-883a-6e51a6dca80d@g1g2000pra.googlegroups.com>...
> Hi friends.....
> when i was doing a vibration problem i got a equation tanh(ax)+tan
> (ax)=0, which is a transecedental equation....i want the roots of this
> equation..... could any body help me to find out the roots of this
> equation by using matlab

  It should be pointed out that for this particular equation there is no need to resort to matlab for roots. Ordinary calculus should suffice. It is clear that there is one root at x = 0. The derivative of the left side with respect to x is a*(sech(a*x)^2+sec(a*x)^2), which can never be zero assuming a is non-zero. This means there could never be any other root than at x=0 without violating the famous law of the mean of calculus.

Roger Stafford

Subject: How to solve transecedental equation using matlab

From: Matt Fig

Date: 14 Feb, 2009 21:32:01

Message: 4 of 6

Roger,
Perhaps I missed something.
We know tanh(a*x) has only one root, x = 0. But tan(a*x) has many roots because it is periodic, plotting tanh(a*x) and -tan(a*x) on the same graph, we can see multiple intersection points.

ezplot('-tan(2*x)',[-4*pi 4*pi])
hold on
ezplot('tanh(2*x)',[-4*pi 4*pi])

Subject: How to solve transecedental equation using matlab

From: Matt Fig

Date: 14 Feb, 2009 21:33:02

Message: 5 of 6

Roger,
Perhaps I missed something.
We know tanh(a*x) has only one root, x = 0. But tan(a*x) has many roots because it is periodic, plotting tanh(a*x) and -tan(a*x) on the same graph, we can see multiple intersection points.

ezplot('-tan(2*x)',[-4*pi 4*pi])
hold on
ezplot('tanh(2*x)',[-4*pi 4*pi])

Subject: How to solve transecedental equation using matlab

From: Roger Stafford

Date: 14 Feb, 2009 22:05:05

Message: 6 of 6

"Matt Fig" <spamanon@yahoo.com> wrote in message <gn7d8h$k2n$1@fred.mathworks.com>...
>......
> We know tanh(a*x) has only one root, x = 0. But tan(a*x) has many roots ......
>......

  Yes, you caught me napping there, Matt. I was unconsciously restricting myself to the range abs(a*x) <= pi/2. There will actually be one root in each interval of width pi/abs(a) above and below that range and matlab is needed to find them. Of course there is antisymmetry here so only the positive roots need be actually computed. Unfortunately there are infinitely many of these.

Roger Stafford

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