Help ! two nonlinear equations
Mostrar comentarios más antiguos
cos(3x)-cos(3y)+1 =0
cos(5x)-cos(5y)+1 =0
please, i can not answer these two nonlinear equations by matlab .
Respuesta aceptada
Más respuestas (2)
Roger Stafford
el 21 de Abr. de 2016
This doesn't solve your equations, but you can gain a better insight into their nature by expanding the cosine expressions in terms of cos(x) and cos(y). Let s = cos(x) and t = cos(y). Then your equations can be expressed:
(4*s^3-3*s)-(4*t^3-3*t)+1 = 0
(16*s^5-20*s^3+5*s)-(16*t^5-20*t^3+5*t)+1 = 0
There will be only a finite number of solution pairs to these polynomial equations whereas each solution (s,t) will have infinitely many combinations of corresponding x and y values which are also solutions. Changing to s and t avoids this confusing infinitude of solutions. I suspect 'solve' will be unable to obtain a specific solution to the above, so you may have to resort to numerical methods with 'fsolve'.
1 comentario
Muhammed Adel
el 8 de Oct. de 2016
Muhammed
the expression
cos(3*x)-cos(3*y)+1=0
is same as
-2*sin((3*(x+y+x-y))/2)*sin((3*(x+y-(x-y)))/2)=-1
sin(1.5*x)*sin(1.5*y)=.5
the second equation
sin(2.5*x)*sin(2.5*y)=.5
and the solution are the points:
sin(1.5*x)*sin(1.5*y)-sin(2.5*x)*sin(2.5*y)=0
that d'Errico shows in the 2D graph, only the intersections of blue and red circles that are available directly from the contours:
[c1,h1]=contour(xx,yy,zz1,[0 0],'color','r')
[c2,h2]=contour(xx,yy,zz2,[0 0],'color','b')
the points of the circles are
blue circles
ax1=h1.XData
ay1=h1.YData
red circles
ax2=h2.XData
ay2=h2.YData
the solution:
x1=intersect(ax1,ax2)
y1=intersect(ay1,ay2)
only happens when
1.5*M*(x+y)=N*2.5*(x-y)
for any positive or negative integer M N
Mr d'Errico, do you agree?
John
note about trigonometry basics:

2 comentarios
John D'Errico
el 22 de Abr. de 2016
I don't see that the relationship
1.5*M*(x+y)=N*2.5*(x-y)
trivially follows from your derivation, nor is it at all useful in predicting solutions.
Muhammed Adel
el 8 de Oct. de 2016
Categorías
Más información sobre Systems of Nonlinear Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
