Question: odeplot of a complex function

hello,

i went to plot a complex numerical solution , i used odeplot but did not work

please help

Thank you very much 


 

> 

restart; with(plots)

> 

NULL

> 

L := 1;

1

(1)
> 

R := 0.57e-1;

0.57e-1

(2)
> 

V := evalf(Pi*R^2*L);

0.1020703453e-1

(3)
> 

pcy := m/V;

97.97164858*m

(4)
> 

Am := 0.6e-1;

0.6e-1

(5)
> 

``

> 

k := evalf(2*Pi/(1.56*T*T));

4.027682890/T^2

(6)
> 

h := 10; -1; zz := h+Am*cos(omega*t)

10+0.6e-1*cos(omega*t)

(7)
> 

g := 9.81;

9.81

(8)
> 

pe := 1025;

1025

(9)
> 

T := 3.57;

3.57

(10)
> 

omega := 2*Pi/T;

1.759995884

(11)
> 

m := (1/2)*pe*evalf(Pi*R^2*L);

5.231105195

(12)
> 

``

> 

``

> 

eq := m*(diff(z(t), `$`(t, 2)))-pe*g*L*R^2-pe*L*R^2*(diff(z(t), `$`(t, 2)))+I*R^3*pe*L*cosh(k*(zz+h))*cos(omega*t)*exp(-I*omega*t)/cosh(k*h)

1.900880195*(diff(diff(z(t), t), t))-32.66950725+(0.1607410765e-1*I)*cosh(6.320462130+0.1896138639e-1*cos(1.759995884*t))*cos(1.759995884*t)*exp(-(1.759995884*I)*t)

(13)
> 

csi := z(0) = 0, (D(z))(0) = 0;

z(0) = 0, (D(z))(0) = 0

(14)
> 

sol := dsolve({csi, eq}, numeric, maxfun = 0):

> 

NULL

> 

sol2 := simplify(evalf(expand(sol))):

> 

fg1 := evalc(Re(sol)):

> 

odeplot(rhs(sol), [t, z(t)], t = 0 .. 3, labels = ["t", "z(t)"], color = blue, thickness = 1, legend = ["z(t) "], axes = boxed)

Error, invalid input: rhs received sol, which is not valid for its 1st argument, expr

 
> 

complexplot(sol, [t, z(t)], t = 0 .. 3, labels = ["t", "z(t)"], color = blue, thickness = 1, legend = ["z(t) "], axes = boxed)

Error, (in plots:-complexplot) invalid input: `plots/complexplot` expects its 2nd argument, r, to be of type {range, name = range}, but received [t, z(t)]

 
> 

NULL

NULL

> 

``


 

Download mapleprime.mwmapleprime.mw

Please Wait...