MaplePrimes Questions

Hi,

I am struggling to find a way to change a term like x to x(t) automatically. If I have something like

Data := x^2

diff(Data, x);

the result is 2x

How can I change this 2x to be 2x(t)?

Thanks,

Baharm31

 

 

Hi guys,

I am trying to find x(t) from these two equations:

odeA := m*diff(x(t), t, t) = -m*A*sin(2*Pi*f*t) - k*x(t) + 0.5*q(t)*(N__f*epsilon__0*L*(-2*x(t)/(G^2 - x(t)^2) + 2*(G__1^2 - x(t)^2)*x(t)/(G^2 - x(t)^2)^2)*(G^2 - x(t)^2)/(2*tan(alpha)*(G__1^2 - x(t)^2)) + N__f*epsilon__0*L*(-2*x(t)/(G^2 - x(t)^2) + 2*(G__2^2 - x(t)^2)*x(t)/(G^2 - x(t)^2)^2)*(G^2 - x(t)^2)/(2*tan(alpha)*(G__2^2 - x(t)^2)))/(N__f*epsilon__0*L*ln((G__1^2 - x(t)^2)/(G^2 - x(t)^2))/(2*tan(alpha)) + N__f*epsilon__0*L*ln((G__2^2 - x(t)^2)/(G^2 - x(t)^2))/(2*tan(alpha)) + C__p) - d*diff(x(t), t);

diff(q(t), t) = (q(t)/(N__f*epsilon__0*L*ln((G__1^2 - x(t)^2)/(G^2 - x(t)^2))/(2*tan(alpha)) + N__f*epsilon__0*L*ln((G__2^2 - x(t)^2)/(G^2 - x(t)^2))/(2*tan(alpha)) + C__p) + V__bias)/R1


 

How can I use dsolve to find x(t), apart from q(t) all other parameters are constant.

Thanks,

Baharm31

 

Can one hope that next version of Maple will be able to solve the standard convection-diffusion pde in 1D?

pde:=diff(u(x,t),t)=d*diff(u(x,t),x$2)+c*diff(u(x,t),x);

in 1D. Even the most simple form with zero boundary conditions can't be solved.

pde:=diff(u(x,t),t)=d*diff(u(x,t),x$2)+c*diff(u(x,t),x);
bc:=u(0,t)=0,u(L,t)=0;
ic:=u(x,0)=f(x);
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming d>0,c>0,L>0

              sol := NULL

I tried some HINT's also but not all of them.

FYI, Mathematica 12.1 is now able to solve the above PDE

ClearAll["Global`*"];
pde=D[u[x,t],t]==d*D[u[x,t],{x,2}]+c*D[u[x,t],x];
bc={u[0,t]==0,u[L,t]==0};
ic=u[x,0]==f[x];
DSolve[{pde,bc,ic},u[x,t],{x,t},Assumptions->{d>0,c>0,L>0}]

Gives

Is it possible I am overlooking some other option or a trick to obtain solution for the above using pdsolve? Only reason I am asking is that Maple can solve much more complicated PDE's and the above is one of the basic diffusion based PDE's. So I am surprised why Maple still can't solve this as it is just a seperation of variables method.

Maple 2020 on windows 10. Physics version 631

Why is my figure not smooth? How can I make it smooth?
 

with(plots, implicitplot); with(plots)

pp1 := implicitplot(mu*x-ln(1+x) = 0, mu = -10 .. 5, x = -5 .. 5, color = black)

 

``


 

Download mm.mw

 I have a problem about extremal function.

The function is shown below with restricted condition of x and a:  x>=2 and -1 < a <0.

(x-3/2)^a-(x-1)^a+(1-2^(a-1))*((x-3/2)^a-(x-1/2)^a)-x*((x-3/2)^a+x^a-(x-1/2)^a-(x-1)^a)

I guess that  it's minimum value is greater than 0.  In other words,  I want prove that  (x-3/2)^a-(x-1)^a+(1-2^(a-1))*((x-3/2)^a-(x-1/2)^a)-x*((x-3/2)^a+x^a-(x-1/2)^a-(x-1)^a)>0

when I use Minimize function,

Optimization:-Minimize((x-3/2)^a-(x-1)^a+(1-2^(a-1))*((x-3/2)^a-(x-1/2)^a)-x*((x-3/2)^a+x^a-(x-1/2)^a-(x-1)^a),{x>=2, -1<a, a<0})

I 'm not seeing but Error, (in Optimization:-NLPSolve) strict inequalities are not valid constraints. I cannot but add the condition of equality of a : -1<=a, a<=0.

Optimization:-Minimize((x-3/2)^a-(x-1)^a+(1-2^(a-1))*((x-3/2)^a-(x-1/2)^a)-x*((x-3/2)^a+x^a-(x-1/2)^a-(x-1)^a),{x>=2, -1<=a, a<=0})

A result is returned with a warning:
Warning, no iterations performed as initial point satisfies first-order conditions
[0.000000, [a = -2.225074*10^(-308), x = 2.000000]]

 

Local or Global ?

When I read recent question post 

https://www.mapleprimes.com/questions/229132-Maximize-Function-Does-Not-Work?ref=Feed:MaplePrimes:New%20Questions

 I'm worrying  that Maple only returns local  extremun. So I use the freely  maple package DirectSearch. We can get it from  https://www.maplesoft.com/applications/view.aspx?SID=101333.

DirectSearch:-GlobalOptima(-((x-3/2)^a-(x-1)^a+(1-2^(a-1))*((x-3/2)^a-(x-1/2)^a)-x*((x-3/2)^a+x^a-(x-1/2)^a-(x-1)^a)),{x>=2, -1<a, a<0},maximize);

 Note: I add a  minus sign to find maximize value .

It returns: [0.002264, [a = -0.000203, x = 1.019590*10^13], 605]

But I substitute the value of a and x  into the function,it returns strange result:   4078.360000 not  -0.002264.

I’m confused.. 

I try to use  Mathematica, 

NMinimize[{(x - 3/2)^a - (x - 1)^
    a + (1 - 2^(a - 1))*((x - 3/2)^a - (x - 1/2)^a) - 
   x*((x - 3/2)^a + x^a - (x - 1/2)^a - (x - 1)^a), 
  x >= 2 && a > -1 && a <= 0}, {x, a}]

It retruns {0., {x -> 13.256, a -> 0.}}  May be well.

 

mimimize.mw

 

i need to create a table with information from plots like how many times x become 0

this is the way to make an null oscillation 

please help!

I am trying to calculate the following integra   
r*rr*g1^2*h1^2*f1^2*fh1^2*exp(-2*t)/t

here g1 is a kummerM functin in s, and also h1 is another kummerM function  in ss, and f1 and fh1 are the HeunB functions with complex arguments in r and rr. and t=sqrt((r-rr)^2+(s-ss)^2).I would like to integte over dr drr ds dss

restart; F := rsolve({16*s(n+1) = 2+12*s(n)-2*s(n-1), s(1) = 1, s(2) = 5/8}, s); Error, (in s) cannot determine if this expression is true or false: n
solve({sigma*E-(mu+alpha+gamma)*I = 0, gamma*E+Lambda*N*P-(mu+alpha)*R = 0, Beta__1*S*E+Beta__2*S*I/(I*M+1)-(mu+sigma)*E = 0, Lambda(1-p)*N-mu*S-Beta__1*S*E-Beta__2*S*I/(I*M+1) = 0}, {E, I, R, S}, explicit)

I'm not sure if there's something on the page I'm not seeing but even  https://www.maplesoft.com/support/help/Maple/view.aspx?path=Optimization/Minimize#examples

 

Maximize(2*x^2 + 2*y^2 + y, {2*x + y <= 6, y^2 - x <= 2})

a literal copy-paste of the posted example maple just repeats what I posted Idk whats wrong. btw is there some way to read the maple documentation pages?

 

Wis_BS2_Taak2_2019-2020_20200323-1.mw

Hello,

I have some huge troubble with making sure all formula's wont be forgotten by Maple.

For example:

f(x):=a+b;
a:=5;
b:=2;
f(x):=f(x);  --> gives me f(x):=f(x) instead of saying f(x):=7

In my document the naming is a bit more complex.

I have a variable named "M_Inwendig2[y]" in the uploaded document. When i name it "M_Inwendig2(y)" (notice [-->( )
maple refuses to use the previous filled/calculated variables.

Due to this error i have copy and pasted the answer to a new formula to continue my work, therefor it becomes quite messy... Now i am trying to fix this.

Ideal all names will be M[inwendig2](y). So the first letter will tell the kind of variable (Moment) the subscript will tell the part (inside) and the depending variable will be between ().

In the document i have marked all error's and copy's RED.

Anyone can advice me? i have named variables the same way in the past, but now it doesnt work.

Regards,

I had difficulty in making my latest post.  It would fail at Submit.

I had success when I saved a draft post.  I was able to edit the draft to submit.

 

Lee


 

I am interested in how easy it is to work with formulae in the Maple language.  For example, you can easily add two equations together with '+'.

 

e1:=x^2+1=2*x;

x^2+1 = 2*x

(1)

e2:=x^3+x=5;

x^3+x = 5

(2)

e1+e2;

x^3+x^2+x+1 = 2*x+5

(3)

 

I was pleased when the following example added (x+1) to both sides of an equation,

 

e3:=x+1;

x+1

(4)

e1+e3;

x^2+x+2 = 3*x+1

(5)

Some other algebraic operations work.

e1-e3;

x^2-x = x-1

(6)

e1*e3;

(x+1)*(x^2+1) = 2*(x+1)*x

(7)

e1/e3;

(x^2+1)/(x+1) = 2*x/(x+1)

(8)

e1^(1/2);

(x^2+1)^(1/2) = 2^(1/2)*x^(1/2)

(9)

 

Build-in functions do not work, though, but there is a simple solution.

exp(e1);

Error, invalid input: exp expects its 1st argument, x, to be of type algebraic, but received x^2+1 = 2*x

 

exp(rhs(e1))=exp(lhs(e1));

exp(2*x) = exp(x^2+1)

(10)

map(exp,e1);

exp(x^2+1) = exp(2*x)

(11)

 

The methods also apply to inequality formulae.  I'm not as pleased about how it does '*' and '/' for inequalities.  You can get more control using rhs and lhs functions.  Here are some examples:  

e4:=x^3<5*(x+1);

x^3 < 5*x+5

(12)

e4+e3;

x^3+x < 6*x+5

(13)

e4-e3;

x^3-x < 4*x+5

(14)

e4*e3;

(x^3 < 5*x+5)*(x+1)

(15)

e4/e3;

(x^3 < 5*x+5)*(1/(x+1))

(16)

eval(%,x=4);

64/5 < 5

(17)

evalb(%);

false

(18)

(16)/x^2;

((x^3 < 5*x+5)*(1/(x+1)))/x^2

(19)

simplify(%);

((x^3 < 5*x+5)*(1/(x+1)))/x^2

(20)

lhs(e4)/e3/x^2 < rhs(e4)/e3/x^2;

x/(x+1) < (5*x+5)/((x+1)*x^2)

(21)

simplify(%);

x/(x+1) < 5/x^2

(22)

 


 

Download equations.mw

Any  idea is good for me !

 

According to Wikipedia  https://www.wikidata.org/wiki/Q3115604 ,

Outerplanar graph  is a graph that can be drawn without crossings in the plane (means it is planar graph) with all vertices on the outer face.  

For example 

 

Recently  in my project, I  need to judge whether a planar graph is a  outerplanar graph.

I tried to find some algorithms but failed. 

Maple  only considers how to test wheather a graph is  planar.

like following:

with(GraphTheory):
with(SpecialGraphs)
K4 := CompleteGraph(4)
IsPlanar(K4, 'F')

   Dear friends,on the left I created two Tasks named a and aa.However,I do not know how to delete these two Tasks.Then I refer to the help pages below.

The text I marked says I should enter full filename.I do not know the fullfile name of customized Tasks.So does anyone know how to delete them?

 

First 291 292 293 294 295 296 297 Last Page 293 of 2143