Output specific plot data...

I have a plot of a sinusoidal function(cos_phi) which changes with incrementing values of variable k. When this function goes above 1 or below -1 I would like to have the range of k for which it occurs outputed somehow. Would anybody know how to do this?

How to find the Domain of f(x) for real solutions ...

Hello,

• Is there a simple way to find the domain for the real solutions of f(x)?

• And is there a way to let maple get the part of f(x) with the sqrt?
(not by typing it by hand as I dit below)

• Is there a way to write the summary of the found domains in one line?

restart:
# How to find the Domain for real solutions for x?
f(x):=(x-1+sqrt(x^2-3*x+2))/(x-1);
discont_for_x=discont(f(x),x);
# x<>+1 (because the de denom=0 is not allowed)
denom(f(x))=0;
x={solve(denom(f(x))=0,x)};
# x<=1 union  2<=x (because the part under the sqrt must be >=0 to give Real solutions)
sqrt(x^2-3*x+2);
0<=x^2-3*x+2;
x=solve(0<=x^2-3*x+2,x);

how to avoid division by zero in dsolve?...

restart:

Eq1:=1/r*diff(r*diff(w(r),r),r)-(cos(z1))^2*(w(r)+1)-DP;

dsolve({Eq1});

bcs:=D(w)(0)=0,w(r2)=A1;

dsolve({Eq1,bcs},w(r)):

where z1, Dp, r2, A1 are constants.

exp(x) calculation ...

how maple calculate exp(x) with e.g. 100000 decimal numbers

a divsion of the series x^k/k! with e.g. 1/25000!/25001 lasts longer than the exp(1.xx) calculation

is there a faster way to calculate exp(x) than with the x^k/k! series

thanks

explicit Runge-Kutta method with one-step...

(a) Design your own 3-stage explicit Runge-Kutta method with one-step error O(h4).

(b) Test your method by solving y= −y. Confirm that the global error in your numerical solution

is O(h3).

unable to compute solution for t

restart:

Eq1:=S*diff(f(x,t),x,t)+diff(f(x,t),x)^2-f(x,t)*diff(f(x,t),x\$2)=diff(f(x,t),x\$3);

BCs := {D[1](f)(0,t)=cos(t), f(0,t)=0,D[1](f)(L,t)=0};

ICs := {f(x,0)=0};

S:=10:L:=5:
smod3:= pdsolve(Eq1,ICs union BCs,numeric,range=0..L);

smod3:-plot(t=0,  color=red):

it seems to me that the problem is due to the mixed bcs. Any way around?

Cheers!

How to perform dynamic geometry program in Maple 1...

Good afternoon sir.

I am working on problems related to functions which require dynamic geometry program or

the Geometers sketch pad. I request to you to kindly suggest me with regard to the above cited query.

With thanks & Regards

M.Anand

Assistant Professor in Mathematics

SR International Institute of Technology,

Error, (in dsolve/numeric/bvp) initial Newton iter...

Dear Experts,

When I run this code in maple I am facing with "Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging".

restart:

unprotect('gamma');
lambda:=5*10^5:
mu:=0.003:
beta:=4*10^(-10):
delta:=0.2:
alpha:=0.043:
sigma:=alpha+delta:
k:=6.24:
gamma:=0.65:
A[1]:=1:
A[2]:=1:

ics := x[1](0)=1.7*10^8, x[2](0)=0,x[3](0)=400,psi[1](50)=0,psi[2](50)=0,psi[3](50)=0:

ode1:=diff(x[1](t), t)=lambda-mu*x[1](t)-(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t)*x[3](t)+delta*x[2](t),
diff(x[2](t), t) =(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t)*x[3](t)-sigma*x[2](t),
diff(x[3](t), t) =(1+psi[3](t)*k*x[2](t)/A[2])*k*x[2](t)-gamma*x[3](t),
diff(psi[1](t), t) =-1+1/A[1]*beta^2*x[1](t)*x[3](t)^2*(psi[1](t)-psi[2](t))^2-psi[1](t)*(-mu+beta^2*x[3](t)^2*(psi[1](t)-psi[2](t))/A[1]*x[1](t)-(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[3](t))-psi[2](t)*(-beta^2*x[3](t)^2*(psi[1](t)-psi[2](t))/A[1]*x[1](t)+(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[3](t)),
> diff(psi[2](t), t) =1/A[2]*psi[3](t)^2*k^2*x[2](t)-psi[1](t)*delta+psi[2](t)*sigma-psi[3](t)*(psi[3](t)*k^2/A[2]*x[2](t)+(1+psi[3](t)*k*x[2](t)/A[2])*k),
> diff(psi[3](t), t) = 1/A[1]*beta^2*x[1](t)^2*x[3](t)*(psi[1](t)-psi[2](t))^2-psi[1](t)*(beta^2*x[1](t)^2*(psi[1](t)-psi[2](t))/A[1]*x[3](t)-(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t))-psi[2](t)*(-beta^2*x[1](t)^2*(psi[1](t)-psi[2](t))/A[1]*x[3](t)+(1-beta*x[1](t)*x[3](t)*(psi[1](t)-psi[2](t))/A[1])*beta*x[1](t))+psi[3](t)*gamma;

sol:=dsolve([ode1,ics],numeric, method = bvp[midrich]);

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

Fourier Transform result not understood...

Hello,

I understand that the question is not really Maple related, but I still hope for some help.

See the worksheet below. I defined a pure sine wave and determined the complex Fourier coefficients for it which I used to plot the amplitude and power spectra. It is easy to see the relations in terms of amplitude and power between the time and frequency signal.

The Fourier Transform of the sine wave logically shows the Dirac distribution, but I can't see the relation in terms of amplitude and power to the original time signal. Taking the integral of the transformed signal (A) wil result in a step of Pi at w=-1 and again at w=1. What am I missing here?

Thanks

 >

Define a signal:

 >
 (1)

Determine the waveform power:

 >
 >
 >
 (2)
 >

Determine the complex Fourier series coefficients and plot the spectra:

 >
 >
 (3)
 >
 (4)
 >
 >

So, the signal power for  of  can be found directly within the power spectrum plot

I would expect to be able to directly see the amplitude and power relation to the time signal from the Fourier Transform of  but i can't.

 >
 (5)

How do I save a package?...

Hi everyone

I am currently trying to make my own simple package including a few procedures. So far I have been able to write some "code" that actually works when I open the document and hit "enter". I would, however, like to save the package so it can be accessed during any Maple session using the command "with". I have unsuccesfully tried to comprehend the Maple help pages regarding this question but I definitely don't want to mess things up.

This is what I have written:

mat := module ()
description "useful procedures for mathematics, physics and chemistry";
export AtomicWeight;
option package;

AtomicWeight := proc (x) description "returns the average atomic mass of the naturally ocurring element";
return evalf(ScientificConstants:-Element(x, atomicweight, system = NewSystem, units))
end proc

end module;

What should I do to save it correctly?

"Too many levels of recursion" error when trying t...

I received an unexpected error message when trying to minimize a function: evaluating

returns the error message

Error, (in @) too many levels of recursion

Why am I getting this message?  It's hard for me to see how minimizing a function involves recursion, unless Maple is trying to iteratively approximate a solution.

Calculating Integrals via different ways...

Mapleprimes_Integral.mw

I have a question regarding following problem:

 (1)

 (2)

Using the representation which should hold for all a>0 and z>0

 (3)

I'm calculating the result the other way around

 (4)

So the results are the same.

But if I calculate this with another function

 (5)

 (6)

 (7)

I get another result :-/ The Integral doesn't even vanish in the limit Z0 -> 0

Though if I take the limit prior:

 (8)

the result is correct. What is the problem here?

Is there a way to see integration results for simu...

Hi MaplePrimers!

I have a simulation in MapleSIM, exported as a compiled procedure in maple using -LinkModel(), and -GetCompiledProc.

I'm trying to do parameter estimation on my MapleSIM model.  Within a optimization scheme, I call the MapleSIM model, and it will output a curve.  Using a least squares method, I compare this measurements to synthetic experimental data (I know the actual values), and generate an objective function.  The optimization algorithm will try different parameter values, and try to minimze the objective function.  When the curves are exactly the same, the objective function will be zero.

The problem I am having is certain parameter sets will cause the model to require very small steps.  I wish to put a timeout on these experiments, because speed is important.  However, I would also like to see the results up to the point of requiring very small steps.  For timeout, I was using code along the lines of:

out:= timelimit(30,cProc(params = PData)); #simulate with 30s limit

where PData are the parameter guessses, and cProc is the compiled MapleSim model.

I would like 'out' to be assigned whatever the results were after 30 seconds, even if the model had not finished integrating.

Thanks in advance for any help!

how i can get a single associated Legendre functi...

hi,

there is a common  differential equation in my maple note,the solution of the eq. can be expressed by

associated Legendre function(s),but i get a result by hypergeometric representation.how i can translate the later into a  single Legendre fun？

 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >