Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hello, i'm new in maple and i don't know how to programming in it. i need to write two For loop in maple to make a matrix. i can write it simply in Matlab as:

can you please Help me to find out how to write this code in maple
Regards

Is it possible to open or import, and execute Maple Flow documents in Maple 2021?

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convODEPlot.mwODEPlot.mwert/ODEPlot.mw .

restart;
with(plots);
g := 32.2;
k := 0.1;
theta := Pi/5;
v := 50;


ode0 := diff(x(t), t $ 2) = 0, diff(y(t), t $ 2) = -g    

                                  
ode1 := diff(x(t), t $ 2) = -k*diff(x(t), t) - x(t) - 1/6*x(t)^3 + 1/120*x(t)^5, diff(y(t), t $ 2) = -g - k*diff(y(t), t) - y(t) - 1/6*y(t)^3 + 1/120*y(t)^5

ics := x(0) = 0, y(0) = 0, D(x)(0) = v*cos(theta), D(y)(0) = v*sin(theta)


dsolve([ode1, ics], numeric)

dsolve([ode0, ics])


display(plot([rhs(dsolve([ode0, ics])[1]), rhs(dsolve([ode0, ics])[2]), t = 0 .. 2], color = red), plot([rhs(dsolve([ode1, ics, numeric])[1]), rhs(dsolve([ode1, ics, numeric])[2]), t = 0 .. 2]), view = [0 .. 75, 0 .. 15])

 

Hi! Do you know maybe how to get this plot of ode1? I guess that computations are ok but I cannot get this plot.

with(VectorCalculus):

SetCoordinates(cartesian[x,y,z]):

TangentLine(z = f(r, theta), r = a, theta = b, coords = cylindrical[r, theta, z]) . le resultat de maple est une équation en x et y comment expliquer ce resulta s'il vous plait et merçi beaucoup.

About eliminate(...)

 

This post is motivated by a recent answer where I needed a necessary and sufficient condition for three straight lines in space be concurrent. I had to use determinants because the eliminate command did not provide the correct answer.
Investigating the cause, I saw that eliminate uses an heuristic algorithm, instead of using Groebner bases (when possible).


Here is an example.

We want to eliminate the unknowns x an y in the system

a*x + y = 0,  b*x+y+1 = 0, c*x+2*y = 0

 

sys:=[a*x + y, b*x + y + 1, c*x + 2*y];

[a*x+y, b*x+y+1, c*x+2*y]

(1)

eliminate(sys, [x,y]);

[{x = 0, y = 0}, {1}]

(2)

So, apparently, the elimination is not possible, i.e. for each triple (a,b,c), the system in x and y is incompatible.
This is not true. For example,

 

eval(sys,[a=1,b=3,c=2]);

[x+y, 3*x+y+1, 2*x+2*y]

(3)

eval(%, [x=-1/2, y=1/2]);

[0, 0, 0]

(4)

eliminate  obtained its result this way (just like a superficial human):

solve(sys[[1,3]], [x,y]);
eval(sys[2],%[]); # The result obtained by eliminate

[[x = 0, y = 0]]

 

1

(5)

Now, the correct result (also by hand):

solve(sys[[1,2]], {x,y});
eval(sys[3],%);
numer(simplify(%));

{x = 1/(a-b), y = -a/(a-b)}

 

c/(a-b)-2*a/(a-b)

 

c-2*a

(6)

So, for c = 2*a  (and a <> b)  the system in x,y  is compatible.

 

This result can be obtained with Groebner bases.

Groebner:-Basis(sys, plex(x,y,a,b,c));

[2*a-c, 2*b*y-c*y-c, c*x+2*y, b*x+y+1]

(7)

remove(has, %, {x,y});

[2*a-c]

(8)

Note that it is more efficient to use lexdeg([x,y], [a,b,c])  instead of plex(x,y,a,b,c).

Groebner:-Basis(sys, lexdeg([x,y], [a,b,c]));

[2*a-c, 2*b*y-c*y-c, c*x+2*y, b*x+y+1]

(9)

The conclusion is that eliminate should use internally Groebner:-Basis for polynomial systems.
Until then, we can use it ourselves!

 

Hello there,
I'd like to know, if there's any way of testing these following relations on Maple.
I've tried to look at the assume command, but without succes.

I'll link the tasks below as an example:

Text translation:
f(x) is given as cos(x). Show that |f(x)-P(x0)| ≤ |x-x0|, when x is a real number

Please help me solve the following problem with Maple commands:
Determine the equation of the line d, knowing that d passes through the point A(1,-2,3) and intersects both lines d1:(x-1)/2=y/1=(z+3)/ -2 and d2:(x-1)/-1=y/1=(z-3)/2. Thank you very much!

Any idea why I can't write Excel output to my standard Documents directory?

Writeout to a different directory outside seems to work.

Any specific Windows rights that need to be given to a directory for writeout?

My OS is Linux/Fedora 35.

Without knowing that Feodra is sadly no more officially supported (it used to be the case a few years ago as I was using it on Fedora) I purchased a standalone license of Maple 2021 and  downloaded the Linux installer but am unable to run the file

Maple2021.2LinuxX64Installer.run

from command line (typing 

% sh ./Maple2021.2LinuxX64Installer.run

produces the error "can't execute a binary file") or by clicking on it ("no software installed to run this file").

Before returning the product, I looked at this page to find a possible workaround:

https://faq.maplesoft.com/s/article/Maple-is-not-activating-on-64-bit-Linux?language=en_US

where some tips to install Maple on non-officially supported Linux  os.

I installed lsb packages so that typing:

lsb_relase -a

outputs

LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:    Fedora
Description:    Fedora release 35 (Thirty Five)
Release:    35
Codename:    ThirtyFive

Anyone has succeeded to install Maple 2021 on Fedora? Thank you in advance.

Simple question

Got stuck

tup_10_g_trying.mw

Want output to look like - 

tuple10(50,12,14,0,0,0,0,0,0,0,0)

1 5 17 19
2 17 29 31
3 29 41 43
4 47 59 61

Please assist.
Regards,
Matt A

x := 'x';
y := 'y';
f := 9*x^3 - 7*x^2*y + 8*x*y^2 - 6*y^3 + 3*x^2 - 3*x*y + 4*y^2 - 3*x + 9*y - 7;
critical points of f are:

fx=diff(f,x);

fy= diff(f,y);

ctpts= solve({fx=0,fy=0},{x,y});

Answers are in radical form, wish to simplified way.

tried using simplify(ctpst) /simplify(%) 

kindly help me in obtaining the simplified answers either real or complex or both

I wrote a small code to solve the equations. The problem is whenever i change the value of variable 'S' from 1 to 1.0 maple produces different solution. It means that i am only right solution for S=1. I can't get right solution other than S=1. I haven't faced this kind of problem before. Can anybody take a look? Is there something wrong with the code? Thanks!

restart:with(PDEtools):declare(f(eta),theta(eta),quiet):S:=1:
f(eta):=sum((q^i)*f[i](eta),i=0..16):
eqa:=simplify(diff(f(eta),eta,eta,eta)+(q*g*((f(eta)*diff(f(eta),eta,eta))-((diff(f(eta),eta))*(diff(f(eta),eta)))-(S*diff(f(eta),eta))-(((S*eta)/2)*diff(f(eta),eta,eta))))):
f[0](eta):=(alpha/2)*eta^2+eta:
for m from 1 to 8 do eq[m]:=coeff(eqa,q^m) end do:
for m from 1 to 8 do (simplify(int(int(int(((-1)*eq[m]),eta),eta),eta)+f[m](eta))):f[m](eta):=simplify(%) end do:
a1:=simplify(sum(f[n](eta),n=0..8)):
b1:=simplify(subs(eta=1,a1))=(S/2):b2:=simplify(subs(eta=1,diff(a1,eta,eta)))=0:
sys:={b1,b2}:solution:=fsolve(sys):s1:=solution[1]:s2:=solution[2]:
alpha:=rhs(s1);g:=rhs(s2);beta:=g^(1/2);
c1:=simplify(a1):c2:=diff(c1,eta,eta):c3:=subs(eta=0,c2)

 

Dear community,

I'm a taxation student and trying to figure out maple more or less successfully for a research project... My aim is to find the indifference curve of the two levels S_TEV and S_P. As its probably not easy to find the formula, I'd alternatively like to approach the indifference curve numerically.

These are the basis codes:

E := 'E'
h := 4                     
m := 0.035
g:= h*m            
k := 0.15
a := 0.25;
F_ANR := 4*m;
r:= 0.1;
T := 'T';
ESt := piecewise
(E < 9984, 0,
E < 14926, (1008.7*(E - 9984)/10000 + 1400)*(E - 9984)/10000,
E < 58596, (206.43*(E - 14926)/10000 + 2397)*(E - 14926)/10000 + 938.24,
E < 277826, 0.42*E - 9267.53,
0.45*E - 17602.28);

Er := E + (E - ESt)*r

EStr := piecewise(Er < 9984, 0,
Er < 14926, (1008.7*(Er - 9984)/10000 + 1400)*(Er - 9984)/10000,
Er < 58596, (206.43*(Er - 14926)/10000 + 2397)*(Er - 14926)/10000 + 938.24,
Er < 277826, 0.42*Er - 9267.53,
0.45*Er - 17602.28)

srp := EStr/E

r_p := r*srp

S_P := ESt*(1 + r_p)^T

EStk := piecewise(K < 9984, 0,
K < 14926, (1008.7*(K - 9984)/10000 + 1400)*(K - 9984)/10000,
K < 58596, (206.43*(K - 14926)/10000 + 2397)*(K - 14926)/10000 + 938.24,
K < 277826, 0.42*K - 9267.53,
0.45*K - 17602.28)

r_tev := 0.29*r

K := (0.71*E*(1 + 0.71*r)^T)*0.6

stev := EStk/K
S_TEV := E*(0.29*(1 + r_tev)^T + 0.71*(0.6*stev))

plot3d([S_TEV/E, S_P/E], E = 0 .. 500000, T = 0 .. 15, color = [white, black])

The plot shows the two levels. Id like to derive the indiffernce curve from this plot (intersection of S_TEV and S_PE).
Starting with probably Diff_S := S_TEV - S_P?

Can someone please help me with finding the right codes? I'm lost.... (eg. solve function for S-TEV-S_P=0; finding the right data frame for Diff_S:=0 or almost zero dependent on E and T, i.e. dataframe of E, T and S_TEV and S_P) so that I can plot (3D) all S_TEV = S_P depending on E, T.

Id be incredibly thankful for any help. It would literally safe my thesis!
Thank you so so much in advance!!
Rebekka

When trying to evaluate the following line with values where units are attached Maple chrashes.

(add(eval(F, {x = XY[n, 1], y = XY[n, 2]})^2, n = 1 .. 4), location)

Problem_units.mw

What is the problem here

First 210 211 212 213 214 215 216 Last Page 212 of 2097