Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Hi,

 

  I have the following code for using "PolynomialSystem" solve equations of polynomial

 

*********

with(SolveTools):

f:=PolynomialSystem({x+y-3, x^2+y^2-5}, {x, y}):

print(x,y);
print(f);
f[1];f[2];
a:=f[1][1];b:=f[1][2];
print(a,b);
c:=-evalf(a);d:=-evalf(b);

****************

 

The output is

***

x, y
{x = 2, y = 1}, {x = 1, y = 2}
{x = 2, y = 1}
{x = 1, y = 2}
x = 2
y = 1
x = 2, y = 1
-x = -2.
-y = -1.

***

From what I have seen, I cannot subtract the values of x and y as 2 and 1. Is there any way that I can get the values of solutions of variables, namely I can assign a variable "a" as 2, and the other variable "b" as 1?

 

Thank you very much!

 

 

 

 

Is it possible to organize output of plots in Mathematica-like manner

1
in one list (placed in one cell)?

In Maple I use tables for these purposes:

1

Maybe, does there exist a more elegant solution?

I just started my Calculus I class and I have a project to prove some various theorems. Maple rocks for this. 

 

How can I insert the Q.E.D. symbol (looks like a little black square) at the end of my proofs?

ok so I run Maple 18 , but the problem is that maple does not show me the phase portrait , it only keep showing me what i write,

for example , i write this  

  DE1 := diff(y(t),t) = z(t);
  DE2 := diff(z(t),t) = -y(t)*cos(t);
  phaseportrait([DE1,DE2],[y,z],t=-5..5,[[y(0)=1,z(0)=0],[y(0)=0,z(0)=2],[y(0)=0,z(0)=-2]],y=-Pi..Pi,z=-3..3,color=aquamarine,linecolor=blue);
  
and maple just show me these back
what should i do?

 

Hello friends,


I try to write a loop in Maple.


The equation is f (x) = x + 3


x is a variable and should be from 50 to 70 with dx = 5 can be used in the function, so that f (x) is to be determined.

How can I write such a loop?

I am attempting to reproduce the the direction field for the the diferential equation below that I found in a book. I am using the dfieldplot command in the window x=0..3 and y=-1..1 but Maple is only plotting the field above the x-axis. I am aware that this is neither a linear DE nor does it posses a unique solution. Is the type of DE the problem here? Do I need to use a different command?

diff(y(x),x)=3*y(x)^(2/3)

 

Hi,

 

I want to compute the determinant of a matrix A with this formula:

 Can someone help me to do it.  Of course, here I am using Einstein's convention.

Thank you in advance.

--------------------------------------
Mario Lemelin
Maple 18 Ubuntu 14.04 LTS - 64 bits
Maple 18 Win 7 Pro - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

Hello everyone, I am having problem while trying to evaluate the double integral written in the file attached double_inegral.mw. Please help me out.
Many thanks in advance.

In this work we show you what to do with the programming of Embedded Components applied to graphics in the Cartesian plane; from the visualization of a point up to three-dimensional objects and also using the Maple language generare own interactive applications for touch screen technology in mobile devices techniques. Given that computers use multicore and designed algorithms that solve calculus problems with very good performance in time; this brings programming to more complex mathematical structures such as in the linear algebra, analytic geometry and advanced methods in numerical analysis. The graphics will show real-time results for the correct use of the parallel programming undertook to bear the procedural technique is well suited to the data structure, curves and surfaces. Interaction in a single graphical container allowing the teaching and / or research the rapid change of parameters; giving a quick interpretation of the results.

 

FAST_UNT_2015.pdf

Programming_Embedded_Components_for_Graphics_in_Maple.mw

Atte.

L.Araujo C.

Physics Pure

Computer Science

 

 

 

So as the title claims I am new to maple and am having trouble with trying to learn how exactly to accomplish certain things.

Mainly being that I am having trouble with a set of exquations that are equal to zero which I then set equal to eachother in order to solve for the values of the variables (x,y)

for example lets say that

f1:= x3-x2-(y2-y)x = 0

f2:= -1-ln(y)+ln(x-y) = 0 

now from here I start to become a bit iffy on what exactly I am supposed to be doing. I have a line of code stating 

f3:=f1=f2

and from there I have had absolutely no luck what so ever. 

any help would be much appreciated.

with(Tolerances):

a := `&+-`(2, .5);

b := `&+-`(30, 10);

evalf(a*b);

with(ScientificErrorAnalysis):

a1 := Quantity(2, .5);

b1 := Quantity(30, 10);

combine(a1*b1, errors);

Dear everyone, 

       I want to deal with experimental data with error. I find two ways to do the job. But  the results are different .Could you tell me which one is more correct?

      Thank you.

Barry.

The Maple help definition for spherical coordinates uses the triple (r, φ, θ) (Note the ordering!!) with φ in the range 0..Π and θ in the range 0..2Π. This means that the second entry in the triple is the zenith angle (latitude) and the third entry in th triple is the azimuth angle (longitude). This is confirmed by the relation to cartesian coordinates stated on the definition page as
x= r sin(φ) cos(θ)

y= r sin(φ) sin(θ)

z= r cos(φ)

However the help page for coords has spherical polars defined by the triple (u, v, w), with the relation to cartesian coordinates given as

x= u cos(v) sin(w)

y= u sin(v) sin(w)

z= u cos(w)

which suggests that this time it is the third entry in the triple (ie w) which is the zenith angle (latitude), with the second entry being the azimuth (longitude).

My simple-minded attempt to check which of these interpretations is correct is shown in the attached worksheet. This seems to confirm that the MapleHelp definitions page is correct and the help/coords page is incorrect - or am I missing something??

Download posVecChk.mw

 

 

Heaviside2.mw

I am a new user of Maple (Dec 2014).  I am trying to calculate an integral related

to mechanical loss.  Temperature is a variable in the problem (as is time), and if

I use a sinusoidal (sine or cosine) temperature-time relationship, I think all works fine.

A difficulty is that the experiments have two-hour hold times(i.e., 7200 seconds) (followed by 22 hours of sinusoidal temperature variation.)

The experiments run for several weeks or months.

I tried using Heaviside functions to model the hold times.(Constant temperature periods)

Now I am receiving errors such as " Error, (in tools/eval_foo/do) too many levels of recursion..."

Probably the Maple code is crude and/or sloppy. Most of the code is simply the setting of constants in the problem.

I will be grateful for suggestions and comments--the file is attached.  Thank you.  John B

T__2 := 291.4:

T__f := 342.7:

B__f := 1265.:

A__0 := 0.452e-10:

`a__σ` := 1.6072:

`b__σ` := 5.6072:

mu := proc (x) options operator, arrow; .212008+0.21666e-2*x end proc:

t__age := 1800.:

`σ__app` := 3.91:

T__0 := 303.15:

D__0 := proc (x) options operator, arrow; .103172+0.633333e-2*x end proc:

A__ex := B__f*T__f/(T__f-T__2)-`a__σ`*`σ__app`^2:

C__ex := B__f*T__f/(T__f-T__2)-`b__σ`*`σ__app`:

A__00 := A__0*exp(A__ex/T__0):

NULL

NumericEventHandler(invalid_operation = `Heaviside/EventHandler`(value_at_zero = 1)):

tm := proc (t) options operator, arrow; `mod`(t, 86400) end proc:(temperature cycle repeats every 24 hours = 86,400 seconds)

T3 := proc (x) options operator, arrow; (303.15+15.+15*sin((3/2)*Pi+2*Pi*(x-7200)/79200.))*(1-Heaviside(x)+Heaviside(x-7200)) end proc:

F3 := proc (x) options operator, arrow; (Heaviside(x)-Heaviside(x-7200))*303.15 end proc:

ftemp := proc (i) options operator, arrow; evalf(T3(tm(i))+F3(tm(i))) end proc:

C := proc (x) options operator, arrow; A__0*exp(C__ex/ftemp(x)) end proc:

`τ__0` := proc (x) options operator, arrow; sqrt(A__00^2*(t__age^mu(ftemp(x)))^2+C(x)^2*x^(2*mu(ftemp(x)))) end proc:

f__0 := proc (z) options operator, arrow; int(1/`τ__0`(x), x = 0 .. z) end proc:

g__0 := proc (y) options operator, arrow; D__0(ftemp(y))*exp(f__0(y)^.333333) end proc:

ftim := proc (i) options operator, arrow; 1800.*i end proc:

`τ__0`(20);

35860.86195

(1)

f__0(20)

Error, (in tools/eval_foo/do) too many levels of recursion

 

NULL

NULL

NULL

NULL

``

 

Download Heaviside2.mwHeaviside2.mw

I have solved ODE's with either i.c. or b.c. (mechanics stuff) where the results were in terms of expressions, not functions.  I could plot these expressions, substitute values in for parameters, etc. 

Then I thought that the real way to solve an ODE or system of ODE's was to define functions.  I wanted this to be in three levels: the solutions in generality, the solutions with i.c./m.c. applied, and then further with the parameter values defined. 

So far, no joy.  Lots of confusion--input eqns as sequence, list, set?  I looked on the Maple help page, thought I was doing things right. I even tried out "union" for the ode's and the ic's.

The code is below; statement (11) produces an error. Yes, I am using Maple 18, even though the file says Maple 15.  I'd like to solve the 4-ODE system at the three levels listed above, and then (if possible), plot the result! Am I asking too much?  Should I be using MapleSim or some other product instead?

 

Thanks for any and all help!

 

robert w.


NULL

restart

assume(m1 > 0);

eqn1 := diff(z1(t), t) = z2(t);

diff(z1(t), t) = z2(t)

(1)

eqn2 := diff(z2(t), t) = -(k1+k2)*z1(t)/m1-(c1+c2)*z2(t)/m1+k2*z3(t)/m1+c2*z4(t)/m1;

diff(z2(t), t) = -(k1+k2)*z1(t)/m1-(c1+c2)*z2(t)/m1+k2*z3(t)/m1+c2*z4(t)/m1

(2)

eqn3 := diff(z3(t), t) = z4(t);

diff(z3(t), t) = z4(t)

(3)

eqn4 := diff(z4(t), t) = k2*z1(t)/m2+c2*z2(t)/m2-k2*z3(t)/m2-c2*z4(t)/m2;

diff(z4(t), t) = k2*z1(t)/m2+c2*z2(t)/m2-k2*z3(t)/m2-c2*z4(t)/m2

(4)

eqns := eqn1, eqn2, eqn3, eqn4;

diff(z1(t), t) = z2(t), diff(z2(t), t) = -(k1+k2)*z1(t)/m1-(c1+c2)*z2(t)/m1+k2*z3(t)/m1+c2*z4(t)/m1, diff(z3(t), t) = z4(t), diff(z4(t), t) = k2*z1(t)/m2+c2*z2(t)/m2-k2*z3(t)/m2-c2*z4(t)/m2

(5)

var := z1(t), z2(t), z3(t), z4(t);

z1(t), z2(t), z3(t), z4(t)

(6)

ic1 := z1(0) = -2;

z1(0) = -2

(7)

ic2 := z2(0) = 0;

z2(0) = 0

(8)

ic3 := z3(0) = 1;

z3(0) = 1

(9)

ic4 := z4(0) = 0;

z4(0) = 0

(10)

ics := ic1, ic2, ic3, ic4;

z1(0) = -2, z2(0) = 0, z3(0) = 1, z4(0) = 0

(11)

dsolve(`union`(eqns, ics), var)

Error, invalid input: `union` received diff(z1(t), t) = z2(t), which is not valid for its 1st argument

 

var;

z1(t), z2(t), z3(t), z4(t)

(12)

data:=(m1=1,m2=2,m3=1,c1=0,c2=0,c3=0,k1=5,k2=2,k3=2);

m1 = 1, m2 = 2, m3 = 1, c1 = 0, c2 = 0, c3 = 0, k1 = 5, k2 = 2, k3 = 2

(13)

eqnsev := subs(data, eqns);

diff(z4(t), t) = z1(t)-z3(t)

(14)

NULL


Download mae340_state_space_4-ode_system.mw

Hello Maple


I am preparing for an examination in Calculus, but my worksheet in Maple 18 doesn't cooperate. 

A lot of my studypartners use Maple 16 and they have no problems. 


I meet the following error: 

- Error, (in solve) invalid input: hastype expects 2 arguments, but received 1


I'm totally sure, that I'm typing correctly, because I write just the same as my studypartners. 
So is it an error, which only is seen in Maple 18 and can I do anything to solve the problem?

Kind regards
Anders Kristensen

PS: I can't figure out how to add a picture

First 67 68 69 70 71 72 73 Last Page 69 of 86