Items tagged with functions functions Tagged Items Feed

Hi all;

I have following program for plotting numerous function using hybrid functions.

if g1(t) is arbitrary function and g2(t) is its approximate by hybrid functions, I want to have a table of g1(t)-g2(t) for different value of t. but the result is without numeric values. what part is wrong????

best wishes

OHB.mws

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi all.

In the following program, i have normalized bernstein polynomials using gram- schmidt orthogonalization process and want to hybrid them with block pulse functions so that i have:

 

why the program is wrong?? where of it doesn't work properly?

please guide me

best wishes

OHB.mws

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi Maple friends.

For the function x^3-3*x^2-24*x+8, I right-click and choose "Evaluate at a point", and then enter the x value to evaluate.

Maple ouputs 

eval( x^3-3*x^2-24*x+8, [x = -2]);

36

But I would like to evaluate at x=-2,4,6, 9.

How can I quickly do this, without having to right-click for all points? If there is any Maple employee reading this, please provide a function in the context menu to evaluate at more than one point. It becomes very tedious when I have 10 functions and need to evaluate up to 10 points for each function.

Thanks in advance.

Hi all

I have written the following code in maple to approximate arbitrary functions by hybrid of block-pulse and bernstein functions but it doesn't work properly especially for f(t)=1.0, so what is the matter?

bb1.mws

 


best wishes

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

I do not like to load a package using with() and then use its commands and functions, since I then lose track knowing from which package a function or command being used in the code came from when I look at the code later on. So I like to write

pkg:-f() or pkg[f]() instead of with(pkg); f()

This seems to work most of the time, except I just found a case where I am forced to do with(pkg) at the top. Here is the example. I'd like to know if there is a workaround where I can avoid with(pkg) in this case as well:

restart;
f:=t->piecewise(t<0,0,t>=0 and t<z,t,t>z,z):
r:=convert(f(t),Heaviside):
r:=inttrans[laplace](r,t,s);


Now since Maple does not know what z is, it could not fully evaluate the result above (I can handle this with assumptions, but this is just an example). So now I replaced z by 0.5, but since laplace is not loaded, it still could not do it:

r:=subs(z=0.5,r);

So now I had to load the package, just to simply the above expression:

with(inttrans);
r;

This all becuase the expression earlier was left with only "laplace" in it, and not "inttrans[laplace]" as I typed. (why this happend, I do not know).

My question is: How would you do the above, without loading the package? I really do not like loading packages as I said, and like to keep the name of the package attached to each function to help me know where each function is coming from.

 

Hello everybody,

I want to find all of roots of the complex variables functions in two ways.

(1) find the value which can make the function equals 0

(2) find the real value and imaginary value which make real part and imaginary part of function equal 0

(I know answers of these two case is not equal completely.)

 

The function is a non-linear function, including sin, cos and Bessel function, such as:

 


And, I used Analytic and fsolve to do case (1) and (2), but failure. The follow result is how I tried to find the real value answer:

 

It seems that both of two commands can only find some of roots. 

How to find all of roots of these cases? The related .mw file is attached.

Cannot_find_all_of_roots.mw

 

Thanks a lot.

 

I'm writing some code that computes a positive integer N and I'd like Maple to define a function of N variables. I've tried writing 

f := (seq(t[i],i=1..N))-> MY EXPRESSION;

but I receive the error

Error, invalid parameter; functional operators require their parameters to be of type symbol or (symbol::type)

Is there anything I can do here?

I've been using a maple package (written by another author) on earlier versions of Maple.  Recently I have been trying to rewrite it so it's a bit more Maple 16+ friendly (since I've read that Maple is not forward-compatible). However, I have been experiencing similar strange behavior in both the original and my current version: 

After saving the module to my personal library, I load with(MyPackage). Most functions work fine (all but a handful out of dozens).  However, some functions won't be recognized (e.g., Coproduct(...) will return itself Coproduct(...)).  

HOWEVER, when I execute the code in the module in its own Maple worksheet, all functions are recognized and work perfectly.  I look at the difference in the code between the functions that work upon loading the package (using with(MyPackage) command in a separate sheet) and those that don't, and there is no difference.

I'm assuming I'll just have to cut and paste the hundreds of lines of code for my package into each sheet I'd like to use it in, since I haven't been able to find others experience this problem in the knowledge base.  I'm hoping someone will be able to help out, however.

hi all.

I have wrore the following program for optimization with bernstein and block pulse hybrid functions.

the program have some errors which i can't understand.

Bernestien1.mws

restart:

alias(C=binomial):
with(LinearAlgebra):
macro(LA= LinearAlgebra):


HybrFunc:=proc(N, M,  tj)               # N=Number of subintervals,  M=Number of functions in subintervals
 
local B, n, m;

global b;

for n from 1 to N do
for m from 0 to M-1 do

B := (i,m,t) -> C(m,i)*(1-t)^(m-i)*t^i:

b[n,m]:=unapply(piecewise(t>=(n-1)*tj/N and t<n*tj/N, B(m,2,N*t-(n-1)*tj), 0), t):
 od:od:


Array(1..N, 0..M-1, (n,m)->b[n,m](t)):

#convert(%,vector);
end proc:

HybrFunc(3, 3, 1);




                                       # End Of Definition
 
g2(t):=t;            #*exp(t-1):                      # Any other function can be replaced here
    

g1(t):=add(add(c[n,m]*b[n,m](t), m=0..2), n=1..3);
Optimization[Minimize](sqrt(int((g2(t)-g1(t))^2, t=0.. 1)));
assign(op(%[2]));
plot([g2(t),g1(t)], t=0..1, 0..5, color=[blue,red],thickness=[1,3],discont, scaling=constrained);

Array(1 .. 3, 0 .. 2, {(1, 0) = piecewise(0 <= t and t < 1/3, (1-3*t)^2, 0), (1, 1) = piecewise(0 <= t and t < 1/3, (6*(1-3*t))*t, 0), (1, 2) = piecewise(0 <= t and t < 1/3, 9*t^2, 0), (2, 0) = piecewise(1/3 <= t and t < 2/3, (2-3*t)^2, 0), (2, 1) = piecewise(1/3 <= t and t < 2/3, (2*(2-3*t))*(3*t-1), 0), (2, 2) = piecewise(1/3 <= t and t < 2/3, (3*t-1)^2, 0), (3, 0) = piecewise(2/3 <= t and t < 1, (3-3*t)^2, 0), (3, 1) = piecewise(2/3 <= t and t < 1, (2*(3-3*t))*(3*t-2), 0), (3, 2) = piecewise(2/3 <= t and t < 1, (3*t-2)^2, 0)}, datatype = anything, storage = rectangular, order = Fortran_order)

g2(t) := t

"g1(t):=c[1,0] ({[[(1-3 t)^2,0<=t and t<1/3],[0,otherwise]])+c[1,1] ({[[6 (1-3 t) t,0<=t and t<1/3],[0,otherwise]])+c[1,2] ({[[9 t^2,0<=t and t<1/3],[0,otherwise]])+c[2,0] ({[[(2-3 t)^2,1/3<=t and t<2/3],[0,otherwise]])+c[2,1] ({[[2 (2-3 t) (3 t-1),1/3<=t and t<2/3],[0,otherwise]])+c[2,2] ({[[(3 t-1)^2,1/3<=t and t<2/3],[0,otherwise]])+c[3,0] ({[[(3-3 t)^2,2/3<=t and t<1],[0,otherwise]])+c[3,1] ({[[2 (3-3 t) (3 t-2),2/3<=t and t<1],[0,otherwise]])+c[3,2] ({[[(3 t-2)^2,2/3<=t and t<1],[0,otherwise]])"

Error, (in Optimization:-NLPSolve) complex value encountered

Error, invalid left hand side in assignment

(1)



Download Bernestien1.mws

 I'll be so grateful if any one can help me.

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Can anyone help to compute the following integral in terms of the bessel functions in maple.

Hello,

I would like to solve easily this equation with maple.

When i use solve or isolate functions, i have a result with arctan function.

"sol := solve(a*cos(gamma)+b*sin(gamma)+c, gamma):
isolate(a*cos(gamma)+b*sin(gamma)+c=0,gamma); "

It is good but i would like solutions with arccos.

In other words, i would like to have these calculations :

a*cos(gamma)+b*sin(gamma)+c=0

cos(psi)=a/sqrt(a²+b²)

sin(psi)=b/sqrt(a²+b²)

thus 

cos(psi)*cos(gamma)+sin(psi)*sin(gamma)=-c/sqrt(a²+b²)

cos(psi+gamma)=-c/sqrt(a²+b²)

gamma=-psi -/+ arccos(c/sqrt(a²+b²))

Is there a possibility to lead this calculation automatically with maple? For example, is it possible to force isolate function to seek for this kind of solution.

Thanks a lot for your help

How do I plot the graph of 3 functions into one page (that is, as a series). Thank you.

Please this is urgent! I can't seem to be able to upload my job on here.

Thanks.

This is the first presentation of updates for the DE and Mathematical Functions programs of Maple 18. It includes several improvements, all in the Mathematical Functions sector, as well as some fixes. The update and instructions for its installation are available on the Maplesoft R&D webpage for DEs and mathematical functions. Some of the items below were mentioned here in Mapleprimes - you are welcome to present suggestions or issues; if possible they will be addressed right away in the next update.

  • Filling gaps in the FunctionAdvisor regarding all the 6 complex components: abs, argument, conjugate, Im, Re, signum, as well as regarding Heaviside (step function), Dirac, min and max.
  • Fix the simplification and differentation rule for doublefactorial
  • Make convert(..., hypergeometric) work the same way as convert(blabla, hypergeom)
  • Implement integral forms for Heaviside(z) and JacobiAM(z, k) via convert(..., Int)
  • Implement appropriate display for the inert %intat function as well as its conversion to the inert Int
  • Make the FunctionAdvisor/DE return not just the PDE system satisfied by f(z, k) = JacobiAM(z, k)and also (new) the ODE satisfied by f(z) = JacobiAM(z, k)
  • Fix conversion rule from Heaviside(z) to Sum
  • Fix unexpected error interruption when differentiating min(...) and max(...) containing more than three arguments
  • Fix issue in simplify/conjugate
  • Improvement in expand/int: factors in disguise are put outside the integration sign
  • Various improvements in the case of multiple integrals involving the Dirac function
  • Make Intat fully inert (before it was evaluating its arguments)
  • Make value of inert indexed objects work

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi:
i have two functions(f(x)&g(x)),i calculated values this functions with numerical method(dsolve,numeric),
now i will plot the f(x)-g(x) for 0<x<1,how do this work?

has anybody any idea for this?  been stuck on it for a while now.

 

let f0 € V be any given function and define a sequence (fn)n€(No) of functions fn € V by 

f:= f0 and fn+1 =Af for all n € (N0)        #A could be the average of the four surrounding points to (i,j) or it could be an N x N matrix with spectral radius less than 1.  not entirely sure. I dont know what it should be but im sure one of you guys know.

prove that this sequence converges pointwise,

 i.e that for all i,j €  [N] x [N], foo(i,j) := limn-> oo fn(i,j) exists.   and that Δfoo=0 

 

it  says to be in the notation of (" http://www.mapleprimes.com/questions/201278-Fix-A-Syntax-Error-In-My-Simple-Function-please-Help")  but it doesnt matter if its not.  I can adapt to what its meant to be if I can get any way to prove it

Thanks in advance.

 

 

1 2 3 4 5 6 7 Last Page 1 of 41