Items tagged with parameters

Hi guys! 

I have a PDE system. The mayority of the equations are equal to zero, but two of them are:

 

where a, b, c, d are CONSTANT parameters. I know that if a=b=d=c=1 the system is inconsistent. But I also know that if a=-1, b=d=0 and c=1 the system is consistent and exist the solution. I wanna know if there's a way to ask maple to find another selections of my parameter that make my PDE consistent and what it's the solution for that selection of a,b,c,d. 

Here's my PDE system (sys2). 

test.mw

thank you so much for your time! 

Hello,

With the Explore function, the use of sliders is very convenient to test the sensibility of a result with regard to a parameter.

However, It is also very convenient to specify a accurate value to a parameter.

Consequently, i would like to combine the use of slider (usually defined in the default mode) with the use of the option "controller=textarea".

Do you have ideas to combine the use of slider and the use of textarea for the definition of the parameters in the Explore function ?


Here you can find a example of the theta4 function depending of 8 parameters (xp3,xp4,zp3,zp4,phi3,phi4, gamma3, gamma4).

TestExplore_4.mw

I manage to use either the sliders or the textarea option but not both.

Thank you in advance for your help and ideas.

Hello, I am using PDEtools to evaluate an equation but got system inconsistent in respect of a parameter used after the command map(pdsolve). I am afraid the result sebsequently given may not be correct, did I do something wrong?

Thanks.

 

test.mw

 

 

 

Also always i try to solve that strange ecuation maple give me like an aswer in terms of Z, with an integral on it, i don't get nothing. I evaluate a point with right click, evaluate a point. Choose the variables value, and the time at wich i want to evaluate the ecuation. Later it give me the same strange solution but with the variables replaced for the values i gave to the program. Then i choose right click, aproximate, and don't matter if i select 5, 10 or more digits, it launchs to me the same strange ecuation, not the number i'm waiting for.

So that i want to know now is how can i manipulate a numerical solution to a diff ecuation.

For example if i got this system of diff ecuation

dx/dt = (-k/m) (x srqt(x^2 + y^2))

dy/dt = (-k/m) (y srqt(x^2 + y^2)) - g

Which is a projectile trajectory taking care of air drag force, and i want to know at which initial speed i have to fire the body to reach 300m if it is fired from the initial point at (0,0), and it's initial velocity on x is 3 times it's initial velocity on y (initial launch angle condition)? 

How can i input that conditions to make maple give me a solution for something like that?

Is there an elegant way to plot a surface with three given parameters, such as
x=(5+w\cos v)\cos u, y=(5+w\cos v)\sin u, z=w\sin v

with u,v between 0 and 2Pi and w between 0 and 3?

Hi,

 

I am trying to solve a simple system of the form AX=0, where A is a N*N matrix, X is an N*1 vector (and the right-hand side of the equation is an N*1 vector of zeros, I apologize for the inexact notation). The difficulty comes from the fact that the values of A are parameterized by 2*N parameters (that I will write as the 2*N vector P), and I would like to get a solution in the form X=f(P).

 

One solution is to try to use LinearAlgebra[LinearSolve], but it only returns the trivial solution X=0, which I am not interested in.

Another solution is to compute analytically the Moore-Penrose pseudoinverse Ag of A, as the general solution is of the form

(I - Ag A)f ;

where f is a vector of free parameters. However, even for a small matrix size (N=4), Maple is still computing after 3 hours on my (fairly powerful) machine, and it is taking more and more memory over time. As the results are polynomial/rational equations in the parameters P, I was actually expecting Maple to be more powerful than other softwares, but for this particular problem, Matlab's symbolic toolbox (muPAD) gives quick solutions until N=6. I need, in the end, to solve additional polynomial/rational equations that are derived from the solutions X=f(P), where Matlab fails. This is why I would really like to be able to solve the above-mentioned problem AX=0 with Maple in order to try to solve the subsequent step of the problem (polynomial system) with Maple.

 

Any suggestions on how to do this would be highly appreciated! Thank you very much for your time and help.

 

Laureline

Hi All

Assume that we have a stochastic model with following density function

and our goal is to estimate unknown parameters namely, alpha, beta, landa, mu and sigma by any available method especially maximum likelihood estimation method.
How can we do it with maple software?

Does the "MaximumLikelihoodEstimate" command can help?

or should i define Maximum Likelihood function first and then differentiate it according to unknown parameters?

 

thanks in advance

 

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Let us consider the maximum value of the polynomial

x^4+c*x^2+x^3+d*x-c-1

on the interval x=-1..1 as a function g of the parameters c and d. General considerations suggest its continuity. However, a plot3d of g does not  confirm it.  Also the question arises "Is the function g(c,d) bounded from below?". Here is my try with the DirectSearch and NLPSolve:

 

restart;
``

g(10, -10)

9.

(1)

plot(x^4+x^3+10*x^2-10*x-10-1, x = -1 .. 1)

 

plot3d(g, -5 .. 5, -5 .. 5, grid = [100, 100], style = surface, color = "DarkOliveGreen")

 

DirectSearch:-GlobalOptima(proc (a, b) options operator, arrow; g(a, b) end proc, {a = -1000 .. 1000, b = -1000 .. 1000}, variables = [a, b])

[-167.208333252089, Vector(2, {(1) = 999.9999999975528, (2) = 166.20833325208952}, datatype = float[8]), 815]

(2)

DirectSearch:-GlobalOptima( (a, b) -> g(a, b), variables = [a, b])

DirectSearch:-GlobalOptima(proc (a, b) options operator, arrow; g(a, b) end proc, variables = [a, b])

Error, (in Optimization:-NLPSolve) invalid input: PolynomialTools:-CoefficientVector expects its 1st argument, poly, to be of type polynom(anything, x), but received HFloat(HFloat(undefined))*x^4+HFloat(HFloat(undefined))*x^3+HFloat(HFloat(undefined))*x^2+HFloat(HFloat(undefined))*x+HFloat(HFloat(undefined))

 

``

 

Download bound.mw

 

This might be a mis-understanding on my part, so I figured I would ask a question first.  Narrowing down my code to something minimalistic, suppose I have 2 functions, each of which take a 'context' (abbreviated ctx) as a keyword parameter.  Now, suppose that the first one calls the second, like so:

foo := proc({ctx :: list := []}) bar(ctx = ctx) end proc:
bar := proc({ctx :: list := []}) nops(ctx) end proc:

and then a call "foo(ctx = [a,b,c])" returns the (completely unexpected) value 0.  See if you can puzzle out why.  If I change my code to use different names, like

foo1 := proc({ctx :: list := []}) bar1(_ctx = ctx) end proc:
bar1 := proc({_ctx :: list := []}) nops(_ctx) end proc:

Then the call "foo1(ctx = [a,b,c])" returns the expected 3.

I have tried a number of variants, like changing the call to bar('ctx' = ctx) in foo, but that does not work.  The completely un-intuitive :-ctx does work.

Is this documented anywhere?  Is this really the intended design?  Not being to re-use a name for a keyword parameter without going through some contortions seems, a little, shall I say, odd?

The issue Type check of parameters was resolved using the depends modifier. As far as I can tell, this modifier is not allowed for expected or keyword parameters, though. Thus the issue seems to reemerge for these types of parameters. Consider the following test example:

createModule := proc(V::Vector)
   local dim := LinearAlgebra:-Dimension(V);
   module()
      export f,g,h;
      f := proc( x::depends('Vector'(dim))              ) x end proc;
      g := proc( x::expects('Vector'(dim)) := something ) x end proc;
      h := proc({x::        'Vector'(dim)  := something}) x end proc;
   end module
end proc:
createModule(Vector(4)):-f(    Vector(4));
createModule(Vector(4)):-g(    Vector(4));
createModule(Vector(4)):-h(x = Vector(4));

The function f is just a restatement of the already resolved issue, compare the above link, while the functions g and h are for the expected and keyword parameter cases, respectively. The problem remains the same: the variable dim is not evaluated for g and h. What to do? Does there exist a solution equally satisfactory as the one for f?

Consider the following two test procedures for creation of the same module:

createModule1 := proc(dim::posint)
    module()
        export det;
        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);
    end module
end proc:

and

createModule2 := proc(A::Matrix(square))
    local dim;
    dim := RowDimension(A);
    module()
        export det;
        det := (x::Matrix(1..dim,1..dim)) -> Determinant(x);
    end module
end proc:

as well as the following code lines calling these:

createModule1(       2 ):-det(IdentityMatrix(2));
createModule2(Matrix(2)):-det(IdentityMatrix(2));

The first line executes unproblematically, while for the second line an error results concerning the dimensionality check 1..dim,1..dim of the matrix. Why is dim available/initialized in the first version, while not in the second?

Hi,

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

 

Thanks

 

Bessel_Function.mw

Dear Maple users

I know how to fit a function with some parameters to some data, but how can it be done if the data is 2-dimensional? I mean: I have some time array T, some X array and some Y array. How do I fit a function with certain parameters to the data: (x(t),y(t)) to fit (X(T), y(T)), ...

Erik

How can I compute F from G according to the following text? (I implemented this but I need a more efficient implementation.)

 

Given a set G of polynomials which are a subset of k[U, X] and a monomial order with U << X, we want to comput set F from G s.t.


1. F is subset of G and for any two distinct f1, f2 in F , neither lpp (f1) is a multiple of lpp (f2) nor lpp (f2) is a multiple of lpp (f1).


2. for every polynomial g in G, there is some polynomial f in F such that lpp (g) is a multiple of
lpp (f ), i.e. ⟨lpp (F )⟩ = ⟨lpp (G)⟩,

--------------------------------------------------------------------------------------

It is worth nothing that F is not unique.

Example:  Let us consider G = {ax^2 − y, ay^2 − 1, ax − 1, (a + 1)x − y, (a + 1)y − a} ⊂ Q[a, x, y], with the lexicographic order on terms with a < y < x.

Then F = {ax − 1, (a + 1)y − a} and F ′ = {(a + 1)x − y, (a + 1)y − a} are both considered set.

please not that K[U,X] is a parametric polynomial ring (U is e sequence of parameters and X is a sequence of variables).

lpp(f) is leading monomial of f w.r.t. variables X. For example lpp(a*x^2+b*y)= x^2.

This is the code hw2_final.mw

This is the warning 

Warning, The use of global variables in numerical ODE problems is deprecated, and will be removed in a future release. Use the 'parameters' argument instead (see ?dsolve,numeric,parameters )"

 

How to solve it?

1 2 3 4 5 6 Page 1 of 6