MaplePrimes Questions

Hi,

Need help in plotting the function in the attached file. m, h and k are parameters.

 

Thanks

 

Bessel_Function.mw

> restart;
> u := -3*sqrt(mu)*tanh*(A+sqrt(-mu)*(x-(1/2)*mu*t))/sqrt(6*a)+3*sqrt(mu)*sech*(A+sqrt(-mu)*(x-(1/2)*mu*t))/sqrt(-6*a);

>
> mu := .5;
0.5
> lambda := 1;
1
> a := 0.5e-1;
0.05
> A := 1.5;
1.5
> plot3d([abs(u)], x = -3 .. 3, t = -3 .. 3);

Hello guys and gals!

I'm not strong enough with maple to get what the result I want.

It seems that it's because I'm asking for two lenths, and not a lenth and an angle, but I have no Idea how to tackle it diferently.

If you know a trick, please share it!

 

Here's an image:

http://imgur.com/xavAUoB

And here's the maple file attached (I think)

 complex_problem_from_the_internet.mw

Thanks,

Happy new year!

Hi,

 

  I think similar question has been asked by several people, but I did not find a suitable thread. My question is, suppose I have a probablity distirubtion function like

  p(x,y) = exp(-alpha (x+y) ) x^2 y^2 / |x-y|  , alpha>0

 x,y goes from - \infty to + \infty. This function is normalizable but unbounded, which makes the rejection algorithm a bit difficult(?).

 

  How to generate samping points from this type of probability distribution function?

 

Thank you very much!

 

hi. i am tottaly new to the maple and i have a problem.

consider function f with variables x & y which are not independent. x & y are functions of t and the relation is unknown.

for example i wanna to the below job:

define f as f=x^2+y^2

differentiate it with respect to t : diff(f,t) which should give me 2(dx/dt)x+2(dy/dt)y

i've googled it alot and i couldn't find anything usefull.

(the problem is how to set x as a function of t with unknown relation and use it in another function and then differentiate it with respect to t)

thanks alot :)

 

has anybody experienced issues with Maple connectiong to Solidworks?  There doen't seem to be much info ion trouble shooting a failed "OpenConnection" call.

 

thanks,

Bill

From a Maple Primes answer two years ago:

f(x,y) is the equation of a line through point [m,n]. The solve command finds values of a and b for which f(x,y) are lines through [m,n] and tangent to x^2 + y^2 = r^2.

f := proc (x, y) options operator, arrow; a*(x-m)+b*(y-n) end proc

solve([f(0, 0) = r, a^2+b^2 = 1], [a, b])

These commands are far from the conventional solution. Why do they provide the correct answers?

Dear all,

Thank you for helping me  to generate a table of values of f(x) starting with x=0 to 100 in steps of 1, that is for x=0,1,2,3,...,100.

 

I tried:

f:=x->2*sqrt(3)*a1*a2*(sum(pochhammer(1/3,k)*3^k*x^(3*k)/(3*k)! ,k=0..infinity)*sum(pochhammer(2/3,k)*3^k*x^(3*k+2)/(3*k+2)!  ,k=0..infinity)-sum(pochhammer(2/3,k)*3^k*x^(3*k+1)/(3*k+1)!  ,k=0..infinity)*sum(pochhammer(1/3,k)*3^k*x^(3*k+1)/(3*k+1)!  ,k=0..infinity));

tab_values:=[evalf(simplify(seq(Ni1(xx),xx=0..100)))];

But I the result is amazing.... I don't understand the problem.

Thanks

 

Hello,

I would like to plot gait diagrams (the lines you can see on the picture belowà from the solutions obtained with a NL oscillator (composed with 8 coupled odes). Here the result that I would like to obtain.

Initial plot:

 

Desired plot

 

 

I would like to obtain 4 lines corresponding to the 4 elliptic trajectories obtained with the NL oscillator. The four lines should be done like this. When the trajectory is above 0, the line should be colored in green. When the trajectory is below 0, the line should be colored in black. 

May you help me to define this kind of graph called gait diagrams from the solution of the NL oscillator ?

Here you can find my maple code:

K:=Matrix([<0, -1, 1, -1>,<-1, 0, -1, 1>,<-1, 1, 0,-1>,<1, -1, -1,0>]);

for i to 4
do
r[i]:=sqrt((u[i](t))^2+(v[i](t))^2):
omega[i]:=omega[sw]/(1+exp(b*v[i](t)))+omega[st]/(1+exp(-b*v[i](t))):
Equ[i]:=diff(u[i](t),t)=Au*(1-r[i]^2)*u[i](t)-omega[i]*v[i](t):
Eqv[i]:=diff(v[i](t),t)=Av*(1-r[i]^2)*v[i](t)+omega[i]*u[i](t)+MatrixVectorMultiply(K,<seq(v[i](t),i=1..4)>)[i]:
EqSys[i]:=[Equ[i],Eqv[i]]:
end do:

paramsCycle:=omega[st]=4*2*Pi,omega[sw]=2*Pi,Au=5,Av=50,b=100;
params:=paramsCycle;

Differential system 
sys:=map(op,eval([seq(EqSys[i],i=1..4)],[params]));
ic:=[u[1](0)=0, v[1](0)=0,u[2](0)=0, v[2](0)=-0.1,u[3](0)=0, v[3](0)=0.1,u[4](0)=0, v[4](0)=0.1];
Résolution1
res:=dsolve([sys[],ic[]],numeric):
Initial boundaries
tcalc:=4;
ic2:=[seq(u[i](0)=eval(u[i](t), res(tcalc)),i=1..4),seq(v[i](0)=eval(v[i](t), res(tcalc)),i=1..4)];
Résolution2
res:=dsolve([sys[],ic2[]],numeric):

tmax:= 40:
numpts:=100*tmax:
plots:-odeplot(res,[t,v[1](t)],0..tmax,thickness=2, view=[0..5, -1.5..1.5],numpoints = numpts);
plots:-odeplot(res,[t,v[2](t)],0..tmax,thickness=2, view=[0..5, -1.5..1.5],numpoints = numpts);
plots:-odeplot(res,[t,v[3](t)],0..tmax,thickness=2, view=[0..5, -1.5..1.5],numpoints = numpts);
plots:-odeplot(res,[t,v[4](t)],0..tmax,thickness=2, view=[0..5, -1.5..1.5],numpoints = numpts);
plots:-odeplot(res,[seq([t,v[i](t)+i*5],i=1..4)],0..tmax,thickness=2,view=[0..5,0..25], numpoints = numpts);

Thanks a lot for your help

Dear all;

Thank you for helping me to solve this  question.

I solve an ode, but I have an error when I would like to plot the solution.

uanble to achieve continuous solution with requested accuracy of 0.1e-5 with maximum 128 point mesh (was able to get 0.14e-5), consider increasing `maxmesh` or using larger `abserr`
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

I try to increase the point mesh or take a large abserr but always I have the same problem.

 

restart:
with(plots):

ode := diff(y(x), x, x) = x*y(x)+sqrt(x);

ics := y(0) = 0, y(1) = 1;
sol:=dsolve({ode,ics}, numeric):
odeplot( sol,[x, y(x)], x=0..1, maxmesh=1000);

I'm not really an expert in maple. I'm stuck with a problem that could be related to the precision of the computational engine...

I defined a function which is relatively complicated as follows:

m := proc (x, l, T) options operator, arrow; (exp(l*(x-T)/(1-exp(-l*T)))*exp(l*T/(1-exp(-l*T)))*(1-exp(-l*T))+(2-exp(-l*T)-exp(l*T))*exp(l*(x-T)/(1-exp(-l*T))))/(exp(l*T)-1)-(l*(x-T)*exp(l*(x-T)/(1-exp(-l*T)))-2*exp(-l*T)+4-2*exp(l*T))/(exp(l*T)-1) end proc

whenever i simplify the equation or factor some of the terms, I get completely different results.

As an example, you can define this function as follows

m := proc (x, l, T) options operator, arrow; (exp(x*l/(1-exp(-l*T)))*(1-exp(-l*T))+(2-exp(-l*T)-exp(l*T))*exp(l*(x-T)/(1-exp(-l*T))))/(exp(l*T)-1)-(l*(x-T)*exp(l*(x-T)/(1-exp(-l*T)))-2*exp(-l*T)+4-2*exp(l*T))/(exp(l*T)-1) end proc

 

By drawing the function, you can see how things get messy.

plot(m(450, (1/250)*x, 250), x = 0 .. 100)

 

I know the problem occurs as a results of computation round-off. How could I ameliorate that? I have already increase the precision in the option menu, but that didn't help. By the way, how can I be sure that the anwers maple gives me is correct, except using my intuition?

 

Hello,

I've tried to find the solution to my problem, but none of my attempts was succesful.

I have a function which is one-to-one in a particular domain which I am interested in. I would like to get the inverse function of it only in this domain. Here is my function and plot for xp=0..10000:

x := xp-> (-1)*720.5668720*sinh(0.2043018094e-3*xp-0.8532729286)+84952.59423+4.014460003*10^5*arcsinh(0.1219272144e-1*sinh(0.2043018094e-3*xp-0.8532729286)-0.2032498888)

I would appreciate any help,

Iza

I am tryng to write and solve within Maple the equations of movement for a single body subject to a gravitatinal field, F_=-GMm/r2

But I get an error message when trying to define the Angular Momentum which doesn't make sense for me.

Thank you for any help on this topíc.


restart; with(Physics[Vectors]); conventions, Setup(mathematicalnotation = true);
conventions, [mathematicalnotation = true]
r_ := rho*_rho;
r_ := rho _rho
_rho(t);
_rho(t)
rho(t);
rho(t)
v_ := diff(rho(t)*_rho(t), t);
/ d \ / d \
v_ := |--- rho(t)| _rho(t) + rho(t) |--- phi(t)| _phi(t)
\ dt / \ dt /
a_ := diff(%, t);
/ 2 \
| d | / d \ / d \
a_ := |---- rho(t)| _rho(t) + 2 |--- rho(t)| |--- phi(t)| _phi(t)
| 2 | \ dt / \ dt /
\ dt /

/ 2 \ 2
| d | / d \
+ rho(t) |---- phi(t)| _phi(t) - rho(t) |--- phi(t)| _rho(t)
| 2 | \ dt /
\ dt /

eq[1] := -G*M*_rho(t)/r^2-a_ = 0;
/ / 2 \ 2\
| G M | d | / d \ |
eq[1] := _rho(t) |- --- - |---- rho(t)| + rho(t) |--- phi(t)| |
| 2 | 2 | \ dt / |
\ r \ dt / /

/ / 2 \
| / d \ / d \ | d |
+ _phi(t) |-2 |--- rho(t)| |--- phi(t)| - rho(t) |---- phi(t)|
| \ dt / \ dt / | 2 |
\ \ dt /

\
|
| = 0
|
/
Eq[1, 2] := seq(Component(lhs(eq[1]), n) = 0, n = 1 .. 2);
/ 2 \ 2
G M | d | / d \
Eq[1, 2] := - --- - |---- rho(t)| + rho(t) |--- phi(t)| = 0,
2 | 2 | \ dt /
r \ dt /

/ 2 \
/ d \ / d \ | d |
-2 |--- rho(t)| |--- phi(t)| - rho(t) |---- phi(t)| = 0
\ dt / \ dt / | 2 |
\ dt /
NULL;

L_ := `&x`(r_, m*v_);
Error, (in Physics:-Vectors:-&x) found the unit vector _rho present also as a function _rho(t); either one form or the other - not both - can be present in an algebraic expression

 

HI, I am trying to solve two PDEs but in boundry conditions there is arising an error plz help.
Nazi.mw

Hello,

I have many tests to conduct on a MapleSim model. At each test simulations, I would like to change slightly some parameters.

As I have many tests to do (with different parameters), I would like to use a script so as to do like this :

Parameters test1
Launch MapleSim simulation
Store results of test 1

And so on ...

How can I do this kind of script ?

Is it possible to store the 3D animation results ?

Thank you for your help.

 

First 1179 1180 1181 1182 1183 1184 1185 Last Page 1181 of 2428