I need a help about Mathematica

  • Context: Mathematica 
  • Thread starter Thread starter sedat
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary

Discussion Overview

The discussion revolves around solving a set of 16th order equations using Mathematica, specifically focusing on extracting real roots from complex solutions and subsequently plotting these roots in a three-dimensional space. Participants explore various coding techniques and seek assistance with matrix algebra and graphical representation.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant describes their problem of obtaining 16 roots from three 16th order equations, noting that they currently have 2 real and 14 complex roots and seek to eliminate the complex roots.
  • Another participant provides a code snippet for deleting complex roots and solving for T1, suggesting a similar approach for T2 and T3.
  • A later reply expresses gratitude for the previous assistance and requests help with placing the results into matrices for further calculations related to coordinates in a 3D space.
  • Additional code snippets are shared to illustrate the construction of rotation matrices based on the results obtained.
  • One participant offers an example of generating points in 3D space and provides code for visualizing these points using Graphics3D, suggesting adjustments to parameters for better visualization.
  • Another participant reiterates the example and encourages sharing the complete results for more tailored assistance.

Areas of Agreement / Disagreement

Participants generally agree on the need to eliminate complex roots and visualize the results, but there is no consensus on the best method for plotting or the specific implementation details. The discussion remains unresolved regarding the optimal approach to achieve the desired graphical output.

Contextual Notes

Some participants' code snippets may depend on specific definitions or previous calculations that are not fully detailed in the discussion. There are also unresolved aspects regarding the integration of results into matrix algebra and the plotting techniques suggested.

sedat
Messages
15
Reaction score
0
Greetings from Turkey,

Friends, I have a big problem about Math. the problem is that I have three equations having 16th orders and I got 16 amount roots which have both complex conj. and real parts by solving these equations with the code of the NSolve, up to here It is all ok, but I would like to eliminate Complex and just print real roots. Now 2 reals and 14 complexes roots are printed on my programing.

in second step; as seen figure-1; after eliminating complexes roots, I would like to put each real root into the form of the "figure-2".

Already thanks dear friends...
 

Attachments

  • figure-1.JPG
    figure-1.JPG
    57.7 KB · Views: 390
  • figure-2.JPG
    figure-2.JPG
    3.3 KB · Views: 333
Physics news on Phys.org
I am looking forward to ur responses...
 
Solve[ArcTan[#]*360/Pi==T1, T1]& /@ DeleteCases[Tan[T1/2]/.ROOTS, _Complex]

OR exactly the same thing written in a different way

T1ROOTS = ReplaceAll[Tan[T1/2], ROOTS];
realT1ROOTS = DeleteCases[T1ROOTS, _Complex];
f[x_] := Solve[ArcTan[x]*360/Pi == T1, T1];
Map[f, realT1ROOTS]

Then repeat this for T2 and for T3
 
Last edited:
Bill Simpson said:
Solve[ArcTan[#]*360/Pi==T1, T1]& /@ DeleteCases[Tan[T1/2]/.ROOTS, _Complex]

OR exactly the same thing written in a different way

T1ROOTS = ReplaceAll[Tan[T1/2], ROOTS];
realT1ROOTS = DeleteCases[T1ROOTS, _Complex];
f[x_] := Solve[ArcTan[x]*360/Pi == T1, T1];
Map[f, realT1ROOTS]

Then repeat this for T2 and for T3


I am so thankful to you, it is a very good expression to me and I am brink on maneging to these thanks to you,

Last thing that I need is that I would like to put each T1, T2 and T3 into some matries and result it. I tried this, but I could not. pls help about this.

I mean that these result are put into matries algebra which will result in some cordinates in x-y-z,

I uploaded what I tried.

Thanks already
 

Attachments

  • 07.06.10-1.JPG
    07.06.10-1.JPG
    80.2 KB · Views: 423
  • 07.06.10-2.JPG
    07.06.10-2.JPG
    91 KB · Views: 421
Rxx1 = {{1,0,0}, {0,Cos[#1 Degree],-Sin[#2 Degree]}, {0,Sin[#3 Degree],
Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Astra]];
Rxx2 = {{1,0,0}, {0,Cos[#1 Degree],-Sin[#2 Degree]}, {0,Sin[#3 Degree],
Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Vectra]];
Rxx3 = {{1,0,0}, {0,Cos[#1 Degree], -Sin[#2 Degree]}, {0,Sin[#3 Degree],
Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Zafira]];
 
Bill Simpson said:
Rxx1 = {{1,0,0}, {0,Cos[#1 Degree],-Sin[#2 Degree]}, {0,Sin[#3 Degree],
Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Astra]];
Rxx2 = {{1,0,0}, {0,Cos[#1 Degree],-Sin[#2 Degree]}, {0,Sin[#3 Degree],
Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Vectra]];
Rxx3 = {{1,0,0}, {0,Cos[#1 Degree], -Sin[#2 Degree]}, {0,Sin[#3 Degree],
Cos[#4 Degree]}}& @@ Map[Last[#] &, Flatten[Zafira]];

Brother, thanks for everything,

I would like to have a suggest from you about the points (x,y,z) found by matries algebra in the last step, I mean how I ought to put the points into 3-D, namely; the plotting ought to look very very nice:) maybe it is plooted in 2-D.

What do you suggest me?
 
I do not see your result so I am not sure. Perhaps this example will help

points=Table[{Sin[t],Cos[t],t/(2 Pi)},{t,0,4Pi,Pi/12}]

to see some sample points. Then

Show[Graphics3D[{PointSize[0.02],Map[Point,points]}],
ViewPoint->{2,-3,5/4},ImageSize->800]

Change PointSize, ViewPoint and ImageSize to best show your points.

To plot in 2D

ListPlot[Map[Drop[#, -1] &, points]]

which removes the z and then plots xy in 2D

If this is not helpful then show the complete result you must plot
 
Bill Simpson said:
I do not see your result so I am not sure. Perhaps this example will help

points=Table[{Sin[t],Cos[t],t/(2 Pi)},{t,0,4Pi,Pi/12}]

to see some sample points. Then

Show[Graphics3D[{PointSize[0.02],Map[Point,points]}],
ViewPoint->{2,-3,5/4},ImageSize->800]

Change PointSize, ViewPoint and ImageSize to best show your points.

To plot in 2D

ListPlot[Map[Drop[#, -1] &, points]]

which removes the z and then plots xy in 2D

If this is not helpful then show the complete result you must plot



my screen result is below.
 

Attachments

  • 08.06.10.JPG
    08.06.10.JPG
    79.3 KB · Views: 420
  • 08.06.10-2.JPG
    08.06.10-2.JPG
    53.5 KB · Views: 445

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K