Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

How do I extract harmonics and plot a spectrum from a piecewise function?
 

The function is "Ia" shown below near the bottom in the "Plot Line Current" section.


 

NULLNULL

NULL

Parm_List := [Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 2*Pi*60, R = 5, Idc = 22.3, mu = .5490]

[Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 120*Pi, R = 5, Idc = 22.3, mu = .5490]

(1)

NULL

NULL

Va := sqrt(2)*Vrms*sin(theta)Vmax =  RmsMS phase to neutral voltage

Vb := sqrt(2)*Vrms*sin(theta-2*Pi*(1/3))

Vc := sqrt(2)*Vrms*sin(theta+2*Pi*(1/3))

Vab := Va-Vb

Vbc := Vb-Vc

Vca := Vc-Va

NULL

com0 := rhs(simplify(solve({Vb = Vc, -Pi < theta and theta < 0}, theta, allsolutions))[1]) = -(1/2)*PiNULL

com1 := rhs(simplify(solve({Vc = Va, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (1/6)*PiNULL

com2 := rhs(simplify(solve({Vb = Vc, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (1/2)*PiNULL

com3 := rhs(simplify(solve({Va = Vb, 0 < theta and theta < Pi}, theta, allsolutions))[1]) = (5/6)*PiNULL

com4 := rhs(simplify(solve({Va = Vc, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (7/6)*Pi 

com5 := rhs(simplify(solve({Vb = Vc, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (3/2)*Pi 

com6 := rhs(simplify(solve({Va = Vb, Pi < theta and theta < 2*Pi}, theta, allsolutions))[1]) = (11/6)*PiNULL

NULL  NULL 

with(plots)

PlotVpn := plot(subs(Vrms = 100, [Va, Vb, Vc]), theta = -(1/2)*Pi .. 3*Pi)

PlotVpp := plot(subs(Vrms = 100, [Vab, Vbc, Vca]), theta = -(1/2)*Pi .. 3*Pi, linestyle = dot, thickness = 1)``

display({PlotVpn, PlotVpp})

 

 

 

 

NULL

NULL

 

plot(subs(Vrms = 100, [Va, Vb, Vc, Vab, Vbc, Vca]), theta = -(1/2)*Pi .. 3*Pi)

 

 

 

 

 

 

 

 

 

The  #1 diode is forward biased and switches on when Va>Vc (Va=Vc). The voltage VD will be equal to Va-Vb until diode #2 turns on when Vc< Vb. Then VD will equal Vc-Vc.

The switching angle for the diodes is given above. If phase control is used all commutation is delayed by the angle α.

NULL``

Without phase delay the average (DC) voltage applied to the laod is the average value of the 6 commutation periods over one cycle:

 

NULL

NULL

Van := sqrt(2)*Erms*sin(theta)Emax =  RmsMS phase to neutral voltage

Vbn := sqrt(2)*Erms*sin(theta-2*Pi*(1/3))

Vcn := sqrt(2)*Erms*sin(theta+2*Pi*(1/3))

NULL

   
Eq1 := Vdo = 6*(int(Van-Vbn, theta = com1 .. com2))/(2*Pi)

Vdo = 3*3^(1/2)*2^(1/2)*Erms/Pi

(2)

 

   

NULL

Eq2 := Vdc = 6*(int(Van-Vbn, theta = com1+alpha .. com2+alpha))/(2*Pi)

Vdc = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi

(3)

    

 

Commutation

The switching between diodes can not occur instantaneously because the supply circuit is inductive. Current can not change instantaneously in and inductive circuit.
The transfer of load current from the out-going phase to the incomming phase is accomplshed by a period of symultaneous conduction of the two adjacent diodes the creation of a circulating current between these two phases that resembles short circuit between the two phases.

The circulating current produces equal voltage drop with opposid polarities in each phase. In the out-going phase the drop adds to the soruce voltage and in the incomming phase the drop subtracts from the source voltage. Only the drop in the incomming phase effects the DC output voltage.

NULL

 

NULL

 

 

 

 

During commutation intervil com1 to com2 phases a and c are shorted while Id is transfered from phase c to phase a. During this time voltage Va-Vb minus the voltage drop in a phase caused by the commutation. This voltage drop is 1/2 the Vac voltage.   

`&Delta;e` := 1/2*(Van-Vcn)

(1/2)*2^(1/2)*Erms*sin(theta)-(1/2)*2^(1/2)*Erms*cos(theta+(1/6)*Pi)

(4)

and      Va=Vc at π/6

`&Delta;E__Avg` = 6*(int(`&Delta;e`, theta = (1/6)*Pi+alpha .. (1/6)*Pi+alpha+mu))/(2*Pi)

`&Delta;E__Avg` = 3*((1/2)*2^(1/2)*Erms*cos((1/6)*Pi+alpha)+(1/2)*2^(1/2)*Erms*sin((1/3)*Pi+alpha)-(1/2)*2^(1/2)*Erms*sin((1/3)*Pi+alpha+mu)-(1/2)*2^(1/2)*Erms*cos((1/6)*Pi+alpha+mu))/Pi

(5)

"(=)"

`&Delta;E__Avg` = (3/2)*2^(1/2)*Erms*(cos((1/6)*Pi+alpha)+sin((1/3)*Pi+alpha)-sin((1/3)*Pi+alpha+mu)-cos((1/6)*Pi+alpha+mu))/Pi

(6)

"(=)"

`&Delta;E__Avg` = (3/2)*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi-(3/2)*Erms*2^(1/2)*3^(1/2)*cos(alpha)*cos(mu)/Pi+(3/2)*Erms*2^(1/2)*3^(1/2)*sin(alpha)*sin(mu)/Pi

(7)

"(=)"

`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*((-cos(mu)+1)*cos(alpha)+sin(alpha)*sin(mu))*3^(1/2)/Pi

(8)

combine(`&Delta;E__Avg` = (3/2)*Erms*2^(1/2)*((-cos(mu)+1)*cos(alpha)+sin(alpha)*sin(mu))*3^(1/2)/Pi, trig)

`&Delta;E__Avg` = (1/2)*(-3*Erms*2^(1/2)*3^(1/2)*cos(alpha+mu)+3*2^(1/2)*Erms*3^(1/2)*cos(alpha))/Pi

(9)

"(=)"

`&Delta;E__Avg` = -(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi

(10)

NULL

DC output voltage

NULL

V__D = Vdc-`&Delta;E__Avg`

V__D = Vdc-`&Delta;E__Avg`

(11)

subs([Vdc = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi, `&Delta;E__Avg` = -(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi], V__D = Vdc-`&Delta;E__Avg`)

 

V__D = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi+(3/2)*3^(1/2)*2^(1/2)*Erms*(cos(alpha+mu)-cos(alpha))/Pi

(12)

"(->)"

 

V__D = (3/2)*2^(1/2)*Erms*3^(1/2)*(cos(alpha)+cos(alpha+mu))/Pi

(13)

 

NULL

Equating the intigral of the voltage drop between the phase A and C  to the intigral of the voltage rise across the two phase inductances (thes intigrals represent eqivalent flux).

 

int(Van-Vcn, theta = (1/6)*Pi+alpha .. (1/6)*Pi+alpha+mu) = int(2*L*omega, theta = 0 .. Id)

2^(1/2)*Erms*cos((1/6)*Pi+alpha)+2^(1/2)*Erms*sin((1/3)*Pi+alpha)-2^(1/2)*Erms*cos((1/6)*Pi+alpha+mu)-2^(1/2)*Erms*sin((1/3)*Pi+alpha+mu) = 2*L*omega*Id

(14)

"(=)"

2^(1/2)*Erms*3^(1/2)*cos(alpha)-2^(1/2)*Erms*3^(1/2)*cos(alpha)*cos(mu)+2^(1/2)*Erms*3^(1/2)*sin(alpha)*sin(mu) = 2*L*omega*Id

(15)

"(=)"

-((cos(mu)-1)*cos(alpha)-sin(alpha)*sin(mu))*3^(1/2)*2^(1/2)*Erms = 2*L*omega*Id

(16)

``

combine(-((cos(mu)-1)*cos(alpha)-sin(alpha)*sin(mu))*3^(1/2)*2^(1/2)*Erms = 2*L*omega*Id, trig)

-Erms*2^(1/2)*3^(1/2)*cos(alpha+mu)+2^(1/2)*Erms*3^(1/2)*cos(alpha) = 2*L*omega*Id

(17)

"(->)"

cos(alpha+mu) = -(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms

(18)

"(->)"

cos(alpha+mu) = -(1/3)*3^(1/2)*2^(1/2)*L*omega*Id/Erms+cos(alpha)

(19)

NULL``

``

``

NULL

subs(cos(alpha+mu) = -(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms, V__D = (3/2)*2^(1/2)*Erms*3^(1/2)*(cos(alpha)+cos(alpha+mu))/Pi)

V__D = (3/2)*2^(1/2)*Erms*3^(1/2)*(cos(alpha)-(1/6)*(2*L*omega*Id-2^(1/2)*Erms*3^(1/2)*cos(alpha))*3^(1/2)*2^(1/2)/Erms)/Pi

(20)

"->"

V__D = 3*2^(1/2)*Erms*3^(1/2)*cos(alpha)/Pi-3*L*omega*Id/Pi

(21)

NULL

NULL

``

 

 

 

 

``

NULL

 

``

``

``

``

``

``

``

``

Line Currents

  

``

NULL NULL

 

 

Commutation Intervals

   

``

Plot Line Currents

 

NULL

Ia := piecewise((-Pi)*(1/6)+alpha < theta and theta <= (-Pi)*(1/6)+alpha+mu, Ia__Int1, (-Pi)*(1/6)+alpha+mu <= theta and theta <= (1/6)*Pi+alpha, Ia__Int2, (1/6)*Pi+alpha < theta and theta <= (1/6)*Pi+alpha+mu, Ia__Int3, (1/6)*Pi+alpha+mu < theta and theta <= (1/2)*Pi+alpha, Ia__Int4, (1/2)*Pi+alpha < theta and theta <= (1/2)*Pi+alpha+mu, Ia__Int5, (1/2)*Pi+alpha+mu < theta and theta <= 5*Pi*(1/6)+alpha, Ia__Int6, 5*Pi*(1/6)+alpha < theta and theta <= 5*Pi*(1/6)+alpha+mu, Ia__Int7, 5*Pi*(1/6)+alpha+mu < theta and theta <= 7*Pi*(1/6)+alpha, Ia__Int8, 7*Pi*(1/6)+alpha < theta and theta <= 7*Pi*(1/6)+alpha+mu, Ia__Int9, 7*Pi*(1/6)+alpha+mu < theta and theta <= 3*Pi*(1/2)+alpha, Ia__Int10, 3*Pi*(1/2)+alpha < theta and theta <= 3*Pi*(1/2)+alpha+mu, Ia__Int11, 3*Pi*(1/2)+alpha+mu < theta and theta <= 11*Pi*(1/6)+alpha, Ia__Int12, 11*Pi*(1/6)+alpha < theta and theta <= 11*Pi*(1/6)+alpha+mu, Ia__Int13)                Ib := piecewise((-Pi)*(1/6)+alpha < theta and theta <= (-Pi)*(1/6)+alpha+mu, Ib__Int1, (-Pi)*(1/6)+alpha+mu <= theta and theta <= (1/6)*Pi+alpha, Ib__Int2, (1/6)*Pi+alpha < theta and theta <= (1/6)*Pi+alpha+mu, Ib__Int3, (1/6)*Pi+alpha+mu < theta and theta <= (1/2)*Pi+alpha, Ib__Int4, (1/2)*Pi+alpha < theta and theta <= (1/2)*Pi+alpha+mu, Ib__Int5, (1/2)*Pi+alpha+mu < theta and theta <= 5*Pi*(1/6)+alpha, Ib__Int6, 5*Pi*(1/6)+alpha < theta and theta <= 5*Pi*(1/6)+alpha+mu, Ib__Int7, 5*Pi*(1/6)+alpha+mu < theta and theta <= 7*Pi*(1/6)+alpha, Ib__Int8, 7*Pi*(1/6)+alpha < theta and theta <= 7*Pi*(1/6)+alpha+mu, Ib__Int9, 7*Pi*(1/6)+alpha+mu < theta and theta <= 3*Pi*(1/2)+alpha, Ib__Int10, 3*Pi*(1/2)+alpha < theta and theta <= 3*Pi*(1/2)+alpha+mu, Ib__Int11, 3*Pi*(1/2)+alpha+mu < theta and theta <= 11*Pi*(1/6)+alpha, Ib__Int12, 11*Pi*(1/6)+alpha < theta and theta <= 11*Pi*(1/6)+alpha+mu, Ib__Int13)

 

NULL

NULL

IaPlot := plot(subs([Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 2*Pi*60, R = 5, Idc = 22.3, mu = .5490], Ia), theta = -(1/6)*Pi .. 3*Pi)

 

IbPlot := plot(subs([Erms = 70.7, L = 0.4e-2, alpha = .524, omega = 2*Pi*60, R = 5, Idc = 22.3, mu = .5490], Ib), theta = -(1/6)*Pi .. 3*Pi)

NULLNULL

NULL

NULL

NULL

NULL

``

``

``

Line Rms Current

   

``

with(OrthogonalSeries)

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``

NULL

``


 

Download Graetz_Bridg7b.mw

Hello all, 

How to animate a set of vectors?

for example, 

q:=Matrix(3,10,(i,j)->i^2+j+2*i); # some matrix which holds the 3x1 vectors. 

with(plots):

animate(arrow,[q(..,i)],i = 1..10);

I get an error 

Error, unsupported type of index, i

In real use, the input to 'arrow' function will be a vector valued function so the 'animate' command will show the resulting vectors. 

 

thanks.

 

EngM.


 

Hello All, 

I am trying to solve a nonlinear equation as a part of inverse kinematic for a robot tip. 

The robot is mostly redundant, and thus, the optimization package is the best to use. 

I looked the NLPSolve function in matrix form. 

the equation(s) am trying to solve is of the following format

Tip - Desired = 0 

Tip is a 6x1 vector and is a function (or expression) of q1 ..., qn number of joints. 

Desired is 6x1 numerical values representing the desired Tip position and orientation. 

for example, for a planar robot with only x,y coordinates

<cos(q[1])*cos(q[3])-sin(q[1])*sin(q[3])+sin(q[1])*q[2]+cos(q[1]), sin(q[1])*cos(q[3])+cos(q[1])*sin(q[3])-cos(q[1])*q[2]+sin(q[1])> - <1,1> = 0

I am a bit confused on how to use the NPLSolve command in matrix form. 

I understand that I need to formulate a procedure p(v) where v is a vector (here it will be v := <q[1], .., q[n]> ) , however, I am not solving one objective function rather 6 of them for 6-degrees of freedom. 

I tried something like

p:=proc(q)
    <cos(q[1])*cos(q[3])-sin(q[1])*sin(q[3])+sin(q[1])*q[2]+cos(q[1]) - 1,sin(q[1])*cos(q[3])+cos(q[1])*sin(q[3])-cos(q[1])*q[2]+sin(q[1]) -1>;
    end proc;
    Optimization[NLPSolve](3,p,initialpoint = evalf(q_start),maximize = false)
where q_start is 3x1 vector giving the initial point. 

but I always get 

Error, (in Optimization:-NLPSolve) non-numeric result encountered

 

How can I solve for set of equations?

thanks.

EngM

Dear all, I've been given the following procedure:

> int_part:=proc(f,h,n::integer) local k,u,v,s;
     > u:=f;
     > v:=h;
     > s:=0;
     > for k from 1 to n do;
     > u:=int(u,t);
     > s:=s-(-1)^(k)*u*v;
     > v:=diff(v,t);

> od;
> s; end: 

To apply on the following function: f:=int((exp(-x*t))/sqrt(t(t+1)),t=1..infinity);

And f is a function of x. F(x).

It should give the asymptotic expansion up to O(x^-6). But probably I do something wrong. Can somebody help me please?

Best wishes, Math

I have a trigonometric equation that outputs with a solution in terms of _B1 which I want to remove.

restart: solve({7*cos(2*t)=7*cos(t)^2-5, t>=0, t<=2*Pi}, t, allsolutions, explicit);

output:

{t = arccos((1/7)*sqrt(14))},

{t = 2*Pi-arccos((1/7)*sqrt(14))},

{t = 2*arccos((1/7)*sqrt(14))*_B1-2*_B1*Pi+2*Pi*_Z1-arccos((1/7)*sqrt(14))+Pi}

Is there anyway to get rid of the _B1, or somehow evaluate it by a substitution?

 

Even numerically the answer still retains the _B1.

{t = 1.006853685}, {t = 5.276331623}, {t = -4.269477938*_B1+6.283185308*_Z1+2.134738969}

 

Also it would be nice to remove the _Z1 subscript too, as the domain of the equation is [0, 2pi].

I tried removing the 'AllSolutions' command , but then I am missing two solutions:

solve({7*cos(2*t)=7*cos(t)^2-5., t>=0 and t<=2*Pi}, t, Explicit);

 {t = 1.006853685}, {t = 2.134738969}

There should be 4 solutions in the domain [0, 2pi].

If the headline is not the appropriate means, then what is the command line based means of generating a new math container in a worksheet, suppose one has a button with the label "Create New Container inside Selected Section" if that makes my intent any more clear.

At first look the above movement seems to be impossible in real life.

The question is sort of convoluted, but I hope somebody can help.

I have a data set I pulled from an Excel Sheet of the temperature for every day for a year.

Currently, it's in an Array 365x2, where the first column is what day of the year it is and the second column is the temperature. I want to create a plot that on the x-axis shows the day, but on the y-axis shows the amount of a certain chemical in the trees. I have a function of temperature vs chemicals, but I want my graph to show the day of the year vs amount of chemical. How would I go about making such a plot? I don't know how to connect all three. 

 

Thanks!

Hi guys,

how do I rearrange the expression eq16, in order to get eq17 by using maple commands?

thank you!

Hello,

Can someone explain to me why the following lists do not have the same content?  And suggest how I might be able to fix the problem?

 

restart;

a := (x^2+y^2)^3 = y^2:

b := (x^2+y^2)^(3/2) = y:

listA := sort([seq(evalf(solve({y >= 0, subs(x = i, a)}, {y})), i = 0.5e-1 .. .5, 0.5e-1)]);

listB := sort([seq(evalf(solve({y >= 0, subs(x = i, b)}, {y})), i = 0.5e-1 .. .5, 0.5e-1)]);

evalb(listA = listB);

If I have a position vector r(t) i polar coordinates and want to calculate velocity I can't get maple to differentiate the unit vectors w.r.t time. How do I do that?

 

hi

I want to equating coefficients of like powers of  in expr732vc and expr732wc, but

this error is appeared.please help me.

Error, unable to compute coeff
3.mw
 

restart;intSet:={int1,int2}

{int1, int2}

(1)

expr732 := 120000*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), x, x))+1200*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))+96.0000*(diff(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[0])+epsilon*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[1])), x, x))+.9600*(diff(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[0])+epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1])), x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x))+.9600*(diff(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[0])+epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1])), x, x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))-(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[0], T[0]))-epsilon*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[1], T[0]))-epsilon*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[1], T[0])+epsilon*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[1], T[1]))), .9600*(diff(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[0])+epsilon*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[1])), x, x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))+.9600*(diff(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[0])+epsilon*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), T[1])), x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x))+0.192e-1*(diff(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[0])+epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1])), x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))+0.96e-2*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))^2*(diff(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[0])+epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1])), x, x))+1200*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))+1200*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x))*(diff(v[0](x, T[0], T[1])+epsilon*v[1](x, T[0], T[1]), x))+18*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x))^2*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x))-1.3943*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), x, x, x, x))-0.111544e-2*(diff(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[0])+epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1])), x, x, x, x))+10-(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[0], T[0]))-epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1], T[0]))-epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1], T[0])+epsilon*(diff(w[0](x, T[0], T[1])+epsilon*w[1](x, T[0], T[1]), T[1], T[1]))):

expr732va := 1.20000*10^5*(diff(v[0](x, T[0], T[1]), x, x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+96.0000*(diff(v[0](x, T[0], T[1]), T[0], x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x, x))*(diff(w[0](x, T[0], T[1]), x))-1.*(diff(v[0](x, T[0], T[1]), T[0], T[0]))+1.20000*10^5*(diff(v[1](x, T[0], T[1]), x, x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+1200.*(diff(w[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+96.0000*(diff(v[1](x, T[0], T[1]), T[0], x, x))+96.0000*(diff(v[0](x, T[0], T[1]), T[1], x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(.9600*(diff(w[1](x, T[0], T[1]), T[0], x)+diff(w[0](x, T[0], T[1]), T[1], x)))*(diff(w[0](x, T[0], T[1]), x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x, x))*(diff(w[1](x, T[0], T[1]), x))+(.9600*(diff(w[1](x, T[0], T[1]), T[0], x, x)+diff(w[0](x, T[0], T[1]), T[1], x, x)))*(diff(w[0](x, T[0], T[1]), x))-1.*(diff(v[1](x, T[0], T[1]), T[0], T[0]))-2.*(diff(v[0](x, T[0], T[1]), T[1], T[0])):

expr732vb1:=select(has,expr732[1],intSet)

0

(2)

expr732vb:=convert(series(map(s->remove(has,s,intSet)*subs(epsilon=0,select(has,s,intSet)),expr732vb1),epsilon,2),polynom);

0 = 0

(3)

expr732vc := 1.20000*10^5*(diff(v[0](x, T[0], T[1]), x, x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+96.0000*(diff(v[0](x, T[0], T[1]), T[0], x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x, x))*(diff(w[0](x, T[0], T[1]), x))-1.*(diff(v[0](x, T[0], T[1]), T[0], T[0]))+(1.20000*10^5*(diff(v[1](x, T[0], T[1]), x, x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+1200.*(diff(w[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+96.0000*(diff(v[1](x, T[0], T[1]), T[0], x, x))+96.0000*(diff(v[0](x, T[0], T[1]), T[1], x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(.9600*(diff(w[1](x, T[0], T[1]), T[0], x)+diff(w[0](x, T[0], T[1]), T[1], x)))*(diff(w[0](x, T[0], T[1]), x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x, x))*(diff(w[1](x, T[0], T[1]), x))+(.9600*(diff(w[1](x, T[0], T[1]), T[0], x, x)+diff(w[0](x, T[0], T[1]), T[1], x, x)))*(diff(w[0](x, T[0], T[1]), x))-1.*(diff(v[1](x, T[0], T[1]), T[0], T[0]))-2.*(diff(v[0](x, T[0], T[1]), T[1], T[0])))*epsilon = 1.20000*10^5*(diff(v[0](x, T[0], T[1]), x, x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+96.0000*(diff(v[0](x, T[0], T[1]), T[0], x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x, x))*(diff(w[0](x, T[0], T[1]), x))-1.*(diff(v[0](x, T[0], T[1]), T[0], T[0]))+(1.20000*10^5*(diff(v[1](x, T[0], T[1]), x, x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+1200.*(diff(w[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+96.0000*(diff(v[1](x, T[0], T[1]), T[0], x, x))+96.0000*(diff(v[0](x, T[0], T[1]), T[1], x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(.9600*(diff(w[1](x, T[0], T[1]), T[0], x)+diff(w[0](x, T[0], T[1]), T[1], x)))*(diff(w[0](x, T[0], T[1]), x, x))+.9600*(diff(w[0](x, T[0], T[1]), T[0], x, x))*(diff(w[1](x, T[0], T[1]), x))+(.9600*(diff(w[1](x, T[0], T[1]), T[0], x, x)+diff(w[0](x, T[0], T[1]), T[1], x, x)))*(diff(w[0](x, T[0], T[1]), x))-1.*(diff(v[1](x, T[0], T[1]), T[0], T[0]))-2.*(diff(v[0](x, T[0], T[1]), T[1], T[0])))*epsilon:

expr732wa:=convert(series(remove(has,expr732[2],intSet),epsilon,2),polynom):

expr732wb1:=select(has,expr732[2],intSet)

0

(4)

expr732wb:=convert(series(map(s->remove(has,s,intSet)*subs(epsilon=0,select(has,s,intSet)),expr732wb1),epsilon,2),polynom)

0 = 0

(5)

expr732wc := .9600*(diff(v[0](x, T[0], T[1]), T[0], x, x))*(diff(w[0](x, T[0], T[1]), x))+.9600*(diff(v[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))+0.192e-1*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+0.96e-2*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[0](x, T[0], T[1]), T[0], x, x))+1200.*(diff(v[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(v[0](x, T[0], T[1]), x))+18.*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[0](x, T[0], T[1]), x, x))-1.3943*(diff(w[0](x, T[0], T[1]), x, x, x, x))-0.111544e-2*(diff(w[0](x, T[0], T[1]), T[0], x, x, x, x))+10.-1.*(diff(w[0](x, T[0], T[1]), T[0], T[0]))+(.9600*(diff(v[0](x, T[0], T[1]), T[0], x, x))*(diff(w[1](x, T[0], T[1]), x))+(.9600*(diff(v[1](x, T[0], T[1]), T[0], x, x)+diff(v[0](x, T[0], T[1]), T[1], x, x)))*(diff(w[0](x, T[0], T[1]), x))+.9600*(diff(v[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(.9600*(diff(v[1](x, T[0], T[1]), T[0], x)+diff(v[0](x, T[0], T[1]), T[1], x)))*(diff(w[0](x, T[0], T[1]), x, x))+0.192e-1*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+(0.192e-1*((diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(diff(w[1](x, T[0], T[1]), T[0], x)+diff(w[0](x, T[0], T[1]), T[1], x))*(diff(w[0](x, T[0], T[1]), x, x))))*(diff(w[0](x, T[0], T[1]), x))+0.96e-2*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[1](x, T[0], T[1]), T[0], x, x)+diff(w[0](x, T[0], T[1]), T[1], x, x))+0.192e-1*(diff(w[0](x, T[0], T[1]), x))*(diff(w[1](x, T[0], T[1]), x))*(diff(w[0](x, T[0], T[1]), T[0], x, x))+1200.*(diff(v[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+1200.*(diff(v[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(v[1](x, T[0], T[1]), x))+1200.*(diff(w[1](x, T[0], T[1]), x, x))*(diff(v[0](x, T[0], T[1]), x))+18.*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[1](x, T[0], T[1]), x, x))+36.*(diff(w[0](x, T[0], T[1]), x))*(diff(w[1](x, T[0], T[1]), x))*(diff(w[0](x, T[0], T[1]), x, x))-1.3943*(diff(w[1](x, T[0], T[1]), x, x, x, x))-0.111544e-2*(diff(w[1](x, T[0], T[1]), T[0], x, x, x, x))-0.111544e-2*(diff(w[0](x, T[0], T[1]), T[1], x, x, x, x))-1.*(diff(w[1](x, T[0], T[1]), T[0], T[0]))-2.*(diff(w[0](x, T[0], T[1]), T[1], T[0])))*epsilon = .9600*(diff(v[0](x, T[0], T[1]), T[0], x, x))*(diff(w[0](x, T[0], T[1]), x))+.9600*(diff(v[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))+0.192e-1*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+0.96e-2*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[0](x, T[0], T[1]), T[0], x, x))+1200.*(diff(v[0](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(v[0](x, T[0], T[1]), x))+18.*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[0](x, T[0], T[1]), x, x))-1.3943*(diff(w[0](x, T[0], T[1]), x, x, x, x))-0.111544e-2*(diff(w[0](x, T[0], T[1]), T[0], x, x, x, x))+10.-1.*(diff(w[0](x, T[0], T[1]), T[0], T[0]))+(.9600*(diff(v[0](x, T[0], T[1]), T[0], x, x))*(diff(w[1](x, T[0], T[1]), x))+(.9600*(diff(v[1](x, T[0], T[1]), T[0], x, x)+diff(v[0](x, T[0], T[1]), T[1], x, x)))*(diff(w[0](x, T[0], T[1]), x))+.9600*(diff(v[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(.9600*(diff(v[1](x, T[0], T[1]), T[0], x)+diff(v[0](x, T[0], T[1]), T[1], x)))*(diff(w[0](x, T[0], T[1]), x, x))+0.192e-1*(diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+(0.192e-1*((diff(w[0](x, T[0], T[1]), T[0], x))*(diff(w[1](x, T[0], T[1]), x, x))+(diff(w[1](x, T[0], T[1]), T[0], x)+diff(w[0](x, T[0], T[1]), T[1], x))*(diff(w[0](x, T[0], T[1]), x, x))))*(diff(w[0](x, T[0], T[1]), x))+0.96e-2*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[1](x, T[0], T[1]), T[0], x, x)+diff(w[0](x, T[0], T[1]), T[1], x, x))+0.192e-1*(diff(w[0](x, T[0], T[1]), x))*(diff(w[1](x, T[0], T[1]), x))*(diff(w[0](x, T[0], T[1]), T[0], x, x))+1200.*(diff(v[0](x, T[0], T[1]), x, x))*(diff(w[1](x, T[0], T[1]), x))+1200.*(diff(v[1](x, T[0], T[1]), x, x))*(diff(w[0](x, T[0], T[1]), x))+1200.*(diff(w[0](x, T[0], T[1]), x, x))*(diff(v[1](x, T[0], T[1]), x))+1200.*(diff(w[1](x, T[0], T[1]), x, x))*(diff(v[0](x, T[0], T[1]), x))+18.*(diff(w[0](x, T[0], T[1]), x))^2*(diff(w[1](x, T[0], T[1]), x, x))+36.*(diff(w[0](x, T[0], T[1]), x))*(diff(w[1](x, T[0], T[1]), x))*(diff(w[0](x, T[0], T[1]), x, x))-1.3943*(diff(w[1](x, T[0], T[1]), x, x, x, x))-0.111544e-2*(diff(w[1](x, T[0], T[1]), T[0], x, x, x, x))-0.111544e-2*(diff(w[0](x, T[0], T[1]), T[1], x, x, x, x))-1.*(diff(w[1](x, T[0], T[1]), T[0], T[0]))-2.*(diff(w[0](x, T[0], T[1]), T[1], T[0])))*epsilon:

eqEps:=seq(convert(map(s->coeff(s,epsilon,i)=0,[expr732vc,expr732wc]),exp),i=0..1)

Error, unable to compute coeff

 

``

``


 

Download 3.mw

 


 

limit(Re(exp(1/4-(1/4)*signum(x))*cos((1/2)*ln(abs(x))/Pi)-I*exp(1/4-(1/4)*signum(x))*sin((1/2)*ln(abs(x))/Pi)), x = infinity)

-1 .. 1

(1)

limit(Re(exp(1/4-(1/4)*signum(x))*cos((1/2)*ln(abs(x))/Pi)-I*exp(1/4-(1/4)*signum(x))*sin((1/2)*ln(abs(x))/Pi)), x = -infinity)

-exp(1/2) .. exp(1/2)

(2)

``


 

Download maplehelp_limit_inferior_superior.mw

Hello, i was just curious about why when i plot the function it indicates the values for both the limits are actually the limit sups, and if anyone has a good reference for me as far as computing these limits by hand and verifying that the precise limit does not actually exist, but can only be indicated by the range (inf(L),sup(L)) as the output suggests.

 

Thankyou in advance!

 This post is similar to an earlier post of mine about an artist drawing the letter A as a hole in line paper.  Replicating that in Maple I have put in the 'too hard' basket for now.  I decided to draw the capital letters of the alphabet.  I started with the letter A, not just because it is the first letter, but that that I thought it was of intermediate difficulty.   (...as well as having lady friends with names starting  with B!:-))  Easier letters would be I and L.   One can draw these using the polygon command.  'A' is harder as it has inner regions which must be catered for viz the triangle and trapezium base.  There are about ten letters of the alphabet with curves:  {B, D, P, R, S} and  { J. G, C  O }.   They all have curved portions, but the former set have curves which "bulge out to the right", (with the possible exception of letter S.)  I decided to dive in and tackle the letter B.  I'd heard of Bezier curves and tried to learn about these.  (More later).  Owing to the bulging B, I decided I'd try to liken that part to an ellipse.  I was not happy with the curvature, so tried modifying the equation, involving powers of 4.  After quite a lot of time I managed to get the upper part of the letter  B.  There were difficulties in coloring the letter and I am indebted to Carl (Love aka DeVore) who I recalled mentioned about the order of displaying the various sections of the letter: that saved me hours of anguish!  At this stage the resulting output was that of the letter D, and I was getting tired.  I did a copy and paste of this code into the program below, to compare the output with my previous letter A.  I was disappointed  as the output for the D was almost non-existent.  Initially I thought there may be differences in the values used for A and D and changed x0, y0 for x0D, y0D - but to no effect.  The cut and paste section of D is between the # # # # .

   The output of the rotated letter A, has 'worked' but it looks unusual - I'm not sure if I suffer from slight astigmatism, or there's a bug in my code!  Comments on this please.  I'm not expecting a close inspection of the code - that may be like finding a needle in a haystack. Any ideas as to why there is little output for D?.  

Bezier Curves

         Restarting from my previous comment on letters C. J etc these have curves which are orientated something akin to y=x^2 - or in maths lingo, their base curves can be represented by functions.  I found sparse mention of Bezier curves on the Maple site, but there are many sites now describing how to construct these.  I'll just constrict talk to quadratic Bezier curves.  A Bez quad curve can be obtained by multiplying PMT - (nothing to do with women's problems!) - where (I think) P is a 1x3 row vector ( P0 P1 P2), M is a 3x3 matrix <1  -2   1,  -2  2  0,  1  0  0> and T is a 3x1 column vector <t^2, t, 1>  and 0<t<1.

  On multiplying this out it comes to something like:

C(t) =(P0-2P1+P2)t^2+ (-2P0+2P1)t +P0

   This is the equation of a quadratic, or parabola, but I'm not sure how to apply it:-(  I believe the P are related to coords of  "control points" , and when t=0 the parabolashould pass through one's begining point, and similarly when t=1 it should correspond to the end point of one's desired curve.

  I'd appreciate some feedback on whether my ideas are correct.  What are P0,P1,P2 ?  Numbers, vectors?  How are they related to the control points?  ...and the coords of initial & last points of one's curve.  It seems to me there is still a lot of trial and error work to do, but I suppose in a GUI environment the user is using a device to view the curve and can quickly choose the appropriate one.

     Thanks for reading this long missive, and again any feedback is much appreciated.

David    

 

restart:

# # # # # # # # # # # #  # # # # # # # #

# Second attempt at the letter A: earlier working version was

# letterA_Art_trick.mws

# Functional operators.  Use of ->

# to find coords of rotated points.

 

#To Do: 

#Rotate Trig through phi

#   "   trapezL

# Orientation looks wrong

#  Check - then put in a proc

# non-numeric vertex in trigArL

# # # # # # # # # # # #  # # # # # # # #

with(plots):

with(plottools):

# Following are parameters for A : to later put in proc(...)

# phi rotates the A through that angle about the origin/

l:=12:w:=2:thet:=Pi/2.7:topl:=2:x0:=2:y0:=5:phi:=3*Pi/4:

 h := (x, y) -> [x*cos(phi)-y*sin(phi), x*sin(phi)+y*cos(phi)]:

 

#Alist is list of coords for letter A

Alist:=[[x0,y0],[x0+l*cos(thet),y0+l*sin(thet)],[x0+l*cos(thet)+topl,y0+l*sin(thet)],[x0+2*l*cos(thet)+topl,y0], [x0+2*l*cos(thet)+topl-w,y0],[x0+5*l*cos(thet)/3+topl-w,y0+l*sin(thet)/3],[x0+l*cos(thet)/3+w,y0+l*sin(thet)/3], [x0+w,y0]]:

#outA:=polygon([[x0,y0],[x0+l*cos(thet),y0+l*sin(thet)],[x0+l*cos(thet)+topl,y0+l*sin(thet)],[x0+2*l*cos(thet)+topl,y0], [x0+2*l*cos(thet)+topl-w,y0],[x0+5*l*cos(thet)/3+topl-w,y0+l*sin(thet)/3],[x0+l*cos(thet)/3+w,y0+l*sin(thet)/3], [x0+w,y0]]):

 

#trigA is small inner triangle of letter A - not rotated

 

eps:=3*w/4:

corr:=.3*w:

#trigA:=polygon([[x0+(2*l*cos(thet)+topl)/2, #y0+l*sin(thet)-eps],[x0+w+(l/3+corr*w)*cos(thet), #y0+(l/3+corr*w)*sin(thet)],[x0+2*l*cos(thet)+topl-w-(l/3+corr*w)*cos(thet)#, y0+(l/3+corr*w)*sin(thet)]], color=white):

 

trigA_L:=[[x0+(2*l*cos(thet)+topl)/2, y0+l*sin(thet)-eps],[x0+w+(l/3+corr*w)*cos(thet), y0+(l/3+corr*w)*sin(thet)],[x0+2*l*cos(thet)+topl-w-(l/3+corr*w)*cos(thet), y0+(l/3+corr*w)*sin(thet)]]:

trigArL:=[]:

for i from 1 to 3 do

  #Get coords from trigA_L

x:=trigA_L[i][1]:

y:=trigA_L[i][2]:

 

# Add coords to new rotated list trigAr

#L := [op(L),x[5]];

trigArL:=[op(trigArL), h(x,y)]:

end do:

#trigArL;

trigAr := polygon(trigArL, color=white, linestyle=1, thickness=1):

#plots[display](trigAr);

 

#Read coords of Alist into another list after first transforming the #coords using func op h.  Angle of rot is phi.  thet is inclination of #letter A

#Main Outline of letter - but NOT the convex hull

Alistr:=[]:

#  h := (x, y) -> [x*cos(phi)-y*sin(phi), x*sin(phi)+y*cos(phi)]:

for i from 1 to 8 do

  #Get coords from Alist

x:=Alist[i][1]:

y:=Alist[i][2]:

 

# Add coords to new rotated list Alistr

#L := [op(L),x[5]];

Alistr:=[op(Alistr), h(x,y)]:

end do:

l2 := polygon(Alistr, color=wheat, linestyle=1, thickness=1):

 

# # # # # # # # # # # # # # # # #

#plots[display](trigAr,l2);

#plots[display](trigAr,trapezL, l2);

#trigAr,

 

#thet:=Pi/3:

# Rotation by thet  anti-clockwise about the origin

#h := (x, y) -> [x*cos(thet)-y*sin(thet), x*sin(thet)+y*cos(thet)]:

#h(sqrt(3), 1);

 

# To find a polygon (trapezium EFGH??) which is the shape of he base of A.

# This is necessary as this portion is colored same as rest of A.

#trapezr:=polygon([[(x0+2*l*cos(thet)+topl-w)*cos(phi)-y0*sin(phi),(x0+2*l*#cos(thet)+topl-w)*sin(phi)+y0*cos(phi)],[(x0+5*l*cos(thet)/3+topl-w)*cos(p#hi)-(y0+l*sin(thet)/3)*sin(phi),(x0+5*l*cos(thet)/3+topl-w)*sin(phi)+(y0+l#*sin(thet)/3)*cos(phi)],[(x0+l*cos(thet)/3+w)*cos(phi)-(y0+l*sin(thet)/3)*#sin(phi),(x0+l*cos(thet)/3+w)*sin(phi)+(y0+l*sin(thet)/3)*cos(phi)],[(x0+w#)*cos(phi)-y0*sin(phi),(x0+w)*sin(phi)+y0*cos(phi)]],color=white,filled=tr#ue,  linestyle=DOT):

 

#trapezL is a list of coords of the base trapezium

#THESE coords have not been rotated.  Repeat previous procedure to obtain #rotated coords

trapezr:=[]:

for i from 5 to 8 do

  #Get coords from Alist

x:=Alist[i][1]:

y:=Alist[i][2]:

 

# Add coords to rotated list trapezr

trapezr:=[op(trapezr), h(x,y)]:

end do:

#trap2 := polygon(trapezr, color=wheat, linestyle=1, thickness=1):

 

#trapezL:=polygon([[x0+2*l*cos(thet)+topl-w,y0],[x0+5*l*cos(thet)/3+topl-w,y0+l*sin(thet)/3],[x0+l*cos(thet)/3+w,y0+l*sin(thet)/3], [x0+w,y0]], color=red):

trapezL:=polygon(trapezr, color=white):

 

# lbase is an unseen line at base of the trapezium of A.  Colored white # as needed to be hidden

lbase:=line([(x0+2*l*cos(thet)+topl-w)*cos(phi)-y0*sin(phi),(x0+2*l*cos(thet)+topl-w)*sin(phi)+y0*cos(phi)], [(x0+w)*cos(phi)-y0*sin(phi),(x0+w)*sin(phi)+y0*cos(phi)], color=white):

 

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Letter D  (or top part of B!)

a := .6: b := .5: x0D := 1: y0D:=7:

c1:=15:n:=4:

pl1:=plot([x, y0D+b^2*sqrt(c1-(x-x0D)^n/a^2), x=1..2.6], scaling=constrained, color=wheat,filled=true):

pl2:=plot([x, y0D-b^2*sqrt(c1-(x-x0D)^n/a^2), x=1..2.6], scaling=constrained, color=red, filled=true):  #was white

pl3:=plot([x, y0D+b^2*sqrt(c1/2-(x-x0D)^n/a^2), x=1.3..3], scaling=constrained, color=blue,filled=true):  #was white

pl4:=plot([x, y0D-b^2*sqrt(c1/2-(x-x0D)^n/a^2), x=1.3..3], scaling=constrained,color=wheat, filled=true):

x:=1.3:

#Create & Draw inner up line of D

ylow:=eval(y0D-b^2*sqrt(c1/2-(x-x0D)^n/a^2)):

yhigh:=eval(y0D+b^2*sqrt(c1/2-(x-x0D)^n/a^2)):

l_up_in:=line([x,ylow], [x,yhigh], color=wheat):

#Create & Draw outer up line of D

x:=1:

ylow:=eval(y0D-b^2*sqrt(c1-(x-x0D)^n/a^2)):

yhigh:=eval(y0D+b^2*sqrt(c1-(x-x0D)^n/a^2)):

l_up_out:=line([x,ylow], [x,yhigh], color=white):

plots[display]( pl2,pl4,pl3,l_up_in,l_up_out,pl1, scaling=constrained, view=[1..2.6, 6..8.1]);

# removed l_up_in, before l_up_out - no difference

# # # # # # # # # # # # # # # # # # # # # # # # - End of letter D - # # # #

# Display letter A

plots[display](trigAr,lbase,trapezL, l2);

Below I successfully employed the is command to compare Q1 & Q2.  However, attempting to compare T1 & T2 which is essentially Q1 & Q2 but defined as a functions dependent on m does not work so well.  Can I do this comparison?  If so what is the proper syntax to do this?


 

Ck1 := sin(Pi*k)/(Pi*k);

a[0]+Sum(-(-1+cos(Pi*k))*sin(2*Pi*k*t/T)/(Pi*k), k = 1 .. m)

(1)

Q1 := 2*sin(alpha)*(diff(S11, t)); -1; Q2 := sum(2*sin(alpha)*(2*Ck2*Pi*k*cos(2*Pi*k*t/T)/T), k = 1 .. m); -1; is(Q1 = Q2), is(expand(Q1 = Q2)), is(combine(Q1 = Q2)), is(eval(Q1 = Q2)), is(value(Q1 = Q2)), simplify(Q1-Q2)

true, true, true, true, true, 0

(2)

T1 := proc (m) options operator, arrow; Q1 end proc; 1; T2 := proc (m) options operator, arrow; Q2 end proc; 1; is(T1 = T2), is(expand(T1 = T2)), is(combine(T1 = T2)), is(eval(T1 = T2)), is(value(T1 = T2)), simplify(T1-T2)

false, false, false, false, false, T1-T2

(3)

``


 

Download is_command.mw

1 2 3 4 5 6 7 Last Page 1 of 1368