Ask Your Question
0

How to plot this

asked 2025-01-27 12:40:55 +0100

anonymous user

Anonymous

Hi everyone

I'm trying to plot this

(-3*sqrt(3)*sqrt(2)*t/sqrt((sqrt(3)*sqrt(2)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3)*sqrt(2))^2 + (sqrt(3)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3))^2 + 54) + 1/2*sqrt(2)*e^(1/4*pi), -(sqrt(3)*sqrt(2)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3)*sqrt(2))*t/sqrt((sqrt(3)*sqrt(2)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3)*sqrt(2))^2 + (sqrt(3)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3))^2 + 54) + 1/2*sqrt(2)*e^(1/4*pi), -(sqrt(3)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3))*t/sqrt((sqrt(3)*sqrt(2)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3)*sqrt(2))^2 + (sqrt(3)*(e^(1/2*pi)*D[0](real_part)(1/4*pi) + 2*e^(1/2*pi))*e^(-1/2*pi) - 3*sqrt(3))^2 + 54) + e^(1/4*pi)

how would I plot this in 3D space

edit retag flag offensive close merge delete

Comments

What's D[0]? What does "real_part" mean? What have you tried?

John Palmieri gravatar imageJohn Palmieri ( 2025-01-27 21:58:08 +0100 )edit

Could you provide the code that produced the example?

Fiddling with it might provide something easier to read and to plot.

slelievre gravatar imageslelievre ( 2025-01-31 18:31:44 +0100 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2025-02-01 23:29:48 +0100

Emmanuel Charpentier gravatar image

updated 2025-02-01 23:34:51 +0100

As said in my previous comment to @slelievre's answer (see above or below according to this site's software whims), the D[0](real_part) expression has no obvious meaning. Assuming that :

  • the author meant $\displaystyle{\frac{\partial}{\partial t}\Re\left(t\right)}$

  • $t\in\mathbb{R}$

we can replace it by 1 :

sage: with assuming(t, "real"): real_part(t).diff(t)
1

We note also that this curious notation occurs only in the expression D[0](real_part)(1/4*pi). foo noting the original triplet, duly completed by its closing parenthesis, this replacement leads to :

sage: [u.subs(D[0](real_part)(1/4*pi)==1) for u in foo]
[-1/6*sqrt(6)*sqrt(3)*sqrt(2)*t + 1/2*sqrt(2)*e^(1/4*pi),
 1/2*sqrt(2)*e^(1/4*pi),
 e^(1/4*pi)]

It turns out that all the quantities involved are real :

sage: [[v[0].n() for v in u.subs(D[0](real_part)(1/4*pi)==1).coefficients(t)] for u in foo]
[[1.55088319691803, -1.00000000000000], [1.55088319691803], [2.19328005073802]]

The sought curve is therefore a straight line parallel to the $x$ axis, determined by $y=1.55\dots$ and $z=2.19\dots$. Materializing this graph is lazily left as an exercise to the reader which is incidentally incited to check his notations...

HTH,

edit flag offensive delete link more
0

answered 2025-01-31 18:30:57 +0100

slelievre gravatar image

It seems you want to plot a curve in 3d, parametrized by t.

The example provided in the question has problems:

  • parentheses don't match
  • the entries involve
    • non-real complex numbers, like e^(1/4*pi), e^(1/2*pi), e^(-1/2*pi)
    • the derivative of the real_part function

Here is an example of plotting a parametric curve in 3d:

sage: M(t) = (t + 1, 2 * t - 1, 3 * t)
sage: parametric_plot(M, (-2, 2), color="red")

It could be adapted to the example from the question, once fixed.

edit flag offensive delete link more

Comments

parentheses don't match

Indeed : the given value lacks a final closing parenthesis to orm a complete triplet.

non-real complex numbers, like e^(1/4*pi), e^(1/2*pi), e^(-1/2*pi)

Huh ? the exponential of a real is a (positive) real. Even with a strong lens, I don't see any $i$ in the given expression.

the derivative of the real_part function

... with respect to no variable. Sheer, analytical quality, two hundred proof nonsense. I suspect a cut'n paste error.

viewing the (completed) triplet shows that each of its components has the form $\displaystyle{\frac{at}{b}+c}$, where $a$, $b$ and $c$ are variable-free expressions (nonsensical due to D[0](real_part) insanity).

In other words, the sought curve should be ... a straight line.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2025-02-01 22:14:49 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2025-01-27 12:40:55 +0100

Seen: 62 times

Last updated: Feb 01