How to solve this kind of equation

3 Ansichten (letzte 30 Tage)
Omri
Omri am 11 Dez. 2012
Hi all!
How do I solve the equation y=sin(x)+ e^(0.25x-1.5)? I need the roots...
Also how do I draw it and show the x and y axes?
Thanks!
  2 Kommentare
Walter Roberson
Walter Roberson am 11 Dez. 2012
That is not a polynomial equation!
Omri
Omri am 11 Dez. 2012
Sorry, fixed the topic.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

John Petersen
John Petersen am 11 Dez. 2012
x = [-20:.01:20]';
y=sin(x)+exp(0.25*x-1.5);
figure;plot(x,y);grid
  2 Kommentare
Omri
Omri am 11 Dez. 2012
Thanks. I'm also looking for the roots, how can I calculate them?
John Petersen
John Petersen am 12 Dez. 2012
Numerically. But, as you can see from the plot, when x <-10 it becomes a sine wave. Also, all the roots are x<5.3 so that can constrain your search.

Melden Sie sich an, um zu kommentieren.


Matt J
Matt J am 11 Dez. 2012
Bearbeitet: Matt J am 11 Dez. 2012
The function has infinitely many roots, but here's a way to find one of them
fun=@(x) sin(x)+ exp(0.25*x-1.5)
xroot = fzero(fun, 0)
and to plot in some interval, e.g. [-10,3]
fplot(fun, [-10,3])

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by