Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi everybody,

I have differential equation of the form eq := diff(x(t), t) = x(t) + 1  and I want to find the name of the dependent variable (more generally this issue concerns a differential system in N dependent variables).

How should I use “indets” in order to obtain {t, x(t)} ?

(indets(eq, name) returns {t}, while indets(eq, function) returns {t, x(t), d/dt x(t)}.

Thanks in advance

Perhaps I am being stupid, but I have a problem with functional operators, more specifically with looping through a collection of them. Consider the following code (just a study case):

nonIdMaps := []:
for f in [x -> x,x -> 2*x,x -> 3*x] do
   f,f(y);
   if f(y) <> y then nonIdMaps := [nonIdMaps[],f] end if
end do;
nonIdMaps,map(f -> f(y),nonIdMaps);

There are two things I do not understand about this output: 1.) Why the f's rather than the specific maps as given in the list? 2.) Why two times 3*y in the last line, rather than [2*y,3*y]? (this issue being of course quite likely a consequence of the first one). This behaviour can be compared with the following:

nonIdMaps := select(f -> f(y) <> y,[x -> x,x -> 2*x,x -> 3*x]):
nonIdMaps,map(f -> f(y),nonIdMaps);

the output of which I do understand, being as I expected it to be. I guess that there are some scoping rules I do not understand, or what?

how would you interpret the solutions to this:

>int(sin(y/2)^2/(x*(x-y)*y^2), x=omega__ir*t..omega__c*t) assuming t::positive, omega__ir::positive, omega__c::positive, omega__c>omega__ir;
 

which leads to the expression shown in the screen shot. In particular, I'm interested in the condition for the solution to be "undefined"

thanks.

This app shows the calculation of the final speed of a body after it made contact with a variable force; Taking as reference the initial velocity, mass and graph of the variation of F as a function of time. That is, given the variable forces represented by the lines in the time intervals, we will show the equation of momentum and momentum; With their respective values, followed by their response.

Momentum_with_two_variable_force.mw

https://www.youtube.com/watch?v=2xWkF7JhkpI

Lenin Araujo C.

Ambassador of Maple

 

 

 

 

 

 

If I make a single plot it will always be located in the centre of the worksheet. Is there an option to place it at the left border?

 

Dear friends,

I have to solve the BVP of the following type:

(x-1)*y''(x)+y'(x)=1+x, y(0)=1, y(1)=1

Expressing the highest derivative (y''(x)), we get a singularity at x=1.

So, as recommended, the method bvp[middefer] (or bvp[midrich]) is used:

dsolve({(x-1)*diff(y(x), x$2)+diff(y(x),x) = 1+x, y(0)=0, y(1)=1}, type = numeric, method = bvp[middefer], y(x), 'output' = Array([seq(k/10, k=0..10)]), 'abserr'=1.0e-3, 'maxmesh'=100)

Maple generates the following error:

Error, (in dsolve/numeric/bvp) unable to achieve requested accuracy of 0.10e-2 with maximum 100 point mesh (was able to get 0.82e3), consider increasing `maxmesh` or using larger `abserr`
But as I increase maxmesh, the achievable accuracy (reported in "(was able to get XXX)") decreases:

for

maxmesh = 200: 0.19e4

maxmesh = 500: 0.54e4

maxmesh = 1000: 0.12e5

maxmesh = 5000: 0.73e5

and so on.....

How to solve this equation with desirable accurancy and usage of Array as output?

i want to solve an ode , but maple return an integral in result, how can i have an answer?


 

restart:

eq:=1/(x*y^(2/3))*8.620689655172415*10^(-16)*(-3.11*10^23*x^2*y^(7/6)-3.92*10^19*y^(25/6)+2.14545039999999*10^29*(0.0108*exp(-45.07/y)+exp(-19.98/y^(1/3)-0.00935317203476387*y^2)))/(x+0.015*y^(1.2));

0.8620689655e-15*(-0.3110000000e24*x^2*y^(7/6)-0.3920000000e20*y^(25/6)+0.2317086432e28*exp(-45.07/y)+0.2145450400e30*exp(-19.98/y^(1/3)-0.935317203476387e-2*y^2))/(x*y^(2/3)*(x+0.15e-1*y^1.2))

(1)

eq:=subs(y=y(t),eq):

 

ans:=dsolve(diff(y(t),t)=eq);

t+Intat((12500/1724137931)*x*_a^(2/3)*(3*_a^(6/5)+200*x)/(49*_a^(25/6)+388750*x^2*_a^(7/6)-2896358040*exp(-(4507/100)/_a)-268181300000*exp(-(1/100000000000000000)*(935317203476387*_a^(7/3)+1998000000000000000)/_a^(1/3))), _a = y(t))+_C1 = 0

(2)

 

 

 


 

Download dsolve.mw

 Dear Maple users,

In Maple 18, I want to  label y axis as $\hat{\sigma}_y$.

labels = [x, sigma[y]] works fine but I have no idea how to put a hat on sigma[y] .

regards,

 

Using Tools -> Check for Updates, I have just tried to update my Maple installation from 2017.0 to 2017.1. The download itself went without a hitch, but then nothing happened. In view of the fact that I clicked a button titled 'Download and Install', I would certainly expect the installation to have started automatically after download. Are anyone else experiencing the same odd behaviour?

PS: Related question of mine is Automatic update of help pages?

Limit of function f(x)=[arcsin(x)]/tan(πx/2).  At point x=1

I can't take the inverse laplace transform of one kind of functions.

Would you like to help me?

Thanks.

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

https://drive.google.com/file/d/0Bxs_ao6uuBDUNmd5ZVJtX29GT3c/view?usp=sharing
https://drive.google.com/file/d/0Bxs_ao6uuBDUSUdHSTcwSEQtS3M/view?usp=sharing

would like to return K map of P1

Summation expression for logic only consider 1 but how about wildcard x ?

if consider wildcard x as 1 too, then will use below

source = [[0,0,1,0],[0,0,1,1],[0,1,0,1],[0,1,1,0],[0,1,1,1],[1,0,0,0],[1,0,0,1],[1,0,1,0],[1,0,1,1],[1,1,0,0],[1,1,0,1],[1,1,1,0],[1,1,1,1]];
i use Quine Mccluskey algorithm

got result below

wildcard is 5 or x
[[0, 5, 1, 5], [5, 0, 1, 5], [5, 5, 1, 0], [1, 0, 5, 5], [1, 5, 0, 5], [1, 5, 5, 0], [5, 5, 1, 1], [5, 1, 5, 1], [5, 1, 1, 5], [1, 5, 5, 1], [1, 5, 1, 5], [1, 1, 5, 5]]
A'C + B'C + CD' + AB' + AC' + AD' + CD + BD + BC + AD + AC + AB
 
table1 = [[0,0,0,0],
[0,0,0,1],
[0,0,1,0],
[0,0,1,1],
[0,1,0,0],
[0,1,0,1],
[0,1,1,0],
[0,1,1,1],
[1,0,0,0],
[1,0,0,1],
[1,0,1,0],
[1,0,1,1],
[1,1,0,0],
[1,1,0,1],
[1,1,1,0],
[1,1,1,1]];
 
loand(lonot(tt[0]),tt[2])
loand(lonot(tt[1]),tt[2])
loand(lonot(tt[3]),tt[2])
loand(lonot(tt[1]),tt[0])
loand(lonot(tt[2]),tt[0])
loand(lonot(tt[3]),tt[0])
loand(tt[2],tt[3])
loand(tt[1],tt[3])
loand(tt[1],tt[2])
loand(tt[0],tt[3])
loand(tt[0],tt[2])
loand(tt[0],tt[1])
 
loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loand(lonot(tt[0]),tt[2]),
loand(lonot(tt[1]),tt[2])),
loand(lonot(tt[3]),tt[2])),
loand(lonot(tt[1]),tt[0])),
loand(lonot(tt[2]),tt[0])),
loand(lonot(tt[3]),tt[0])),
loand(tt[2],tt[3])),
loand(tt[1],tt[3])),
loand(tt[1],tt[2])),
loand(tt[0],tt[3])),
loand(tt[0],tt[2])),
loand(tt[0],tt[1]));
def lonot(z):
    if z == 1:
        return 0
    else:
        return 1
def loand(a, b):
    if a == 1 and b == 1:
        return 1
    else:
        return 0
def loor(a, b):
    if a == 0 and b == 0:
        return 0
    else:
        return 1
#A'C + B'C + AB' + CD + A'BD
for tt in table1:
    print loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loor(loand(lonot(tt[0]),tt[2]),
loand(lonot(tt[1]),tt[2])),
loand(lonot(tt[3]),tt[2])),
loand(lonot(tt[1]),tt[0])),
loand(lonot(tt[2]),tt[0])),
loand(lonot(tt[3]),tt[0])),
loand(tt[2],tt[3])),
loand(tt[1],tt[3])),
loand(tt[1],tt[2])),
loand(tt[0],tt[3])),
loand(tt[0],tt[2])),
loand(tt[0],tt[1]));
 
finally i use python to verify
return
0
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
 
seems correct if wildcard is 1 too, but
can boolean simplify function simplify this
A'C + B'C + CD' + AB' + AC' + AD' + CD + BD + BC + AD + AC + AB
 
to
 
C + A + B.D   which is
P1 = D + Q0 + Q1.N in png file ?

Hi, friends

I need to calculate the double integral over a non-rectangular domain.

Say, the domain is the triangle (in red)

When I enter

int(int((x^2+y^2)*`if`((y-x-1/2 <= 0) and (y+2*x-2<=0) and (y+x/2-1/2>=0), 1, 0), x=0..1, numeric = true), y=0..1, numeric = true);

or 

int(int((x^2+y^2)*eval(`if`((y-x-1/2 <= 0) and (y+2*x-2<=0) and (y+x/2-1/2>=0), 1, 0)), x=0..1, numeric = true), y=0..1, numeric = true);

an error occur (Error, (in int) cannot determine if this expression is true or false: y-x <= 1/2 and y+2*x <= 2 and 0 <= y+(1/2)*x-1/2)

For me, it is desirable to write boundary conditions in the int operator itself, not as a separate expession.

 

Regarding my recent question http://www.mapleprimes.com/questions/221909-How-To-Extract-Data-From-Implicit-Function I would like to share an interesting observation. Here the code of the program:

restart;
R0 := ln(y)+Re(Psi(1/2+(2*(p^2+(1/2)*sqrt(2*I+4*ksi_fs^2*p^2)*tanh(sqrt(2*I+4*ksi_fs^2*p^2)*x)/(tau+0.5e-2*a)))/y))+gamma+2*ln(2)
tau:= 10.000:ksi_fs:=10:p:=0.037:
R0p:= unapply(R0, [a,x]):
R0f:= proc(a,x)
local r:= fsolve(R0p(a,x), y= 0..1);
   `if`(r::float, r, Float(undefined))
end proc:
M:= Matrix(
   (100,100),
   (i,j)-> R0f(i, 1 + (j-1)*(0.5-0)/(100-1)),
   datatype= float[8]
);

After approximately 2 hours of calculations I get a message window

But I repeat this calculations on another computer with the same Windows 7 64 bit and Maple 17 I don't get such error and I obtain desired data.

So can Maple be sensitive to the hardware? 

First 936 937 938 939 940 941 942 Last Page 938 of 2215