MaplePrimes Questions

Hi,

I solve numerically an ODE system which depends on 25 parameters.
I want to know the maximum value of the time at which a specific event is triggered, when these parameters vary (independently the one of the other) within a 25 dimensional hyperbox.

To solve this maximization problem, which I assume is local1, I would like to use NLPSolve

The attached zip (I use Mac OSX) contains:

  • a file that gives a full description of the problem (the original ".pages" file and its export as pdf),
  • an m file wich contains the solution procedure plus a few other variables needed to solve the problem,
  • the mw file which contains:
    • the reading of the m file,
    • the procedure (OBJ) which returns the trigerring time,
    • many attemps to find its maximum value using NLPSolve.

None of my attempts at using NLPSolve gave me the expected answer

Could you help me to fix this?

Thanks in advance

mw_and_m_files.zip

1: Initializing a local method (see the explanation file) with different points gave me different optimizers but all of them led to rather close values of the objective function. Thus the problem is either global instead of local, or convergence might not be achieved for all the initialization points (but keep in mind that I'm not interested in the location of the minimizer(s) but in the maximum value of if the time when the event is triggered).


Hi Every one. I was trying to solve three point boundary value problem but cound't get the solution. any help? 
u1 need to plot  -1..0 and u2 from 0..1 and shown in a single doamin -1..1


 

Hi!

I am so pleased to be here to look for help in using Maple.

I am trying to find solutions to a set of nonlinear systems of equations using fsolve.

This code I am tried to solve is shown as follow:

 nonlinearsystemforallsolution.mw

I can get one solution for three variables, however, it's clear there are some solutions missed.

My questions are listed as:

1) How do I get all solutions for a fixed variable of sigma?

2) How do I create a  loop to obtain the solutions for various values of sigma?

3) How to plot solution of each variables versus sigma? 

3) How do I determine the stability of each solution?

Many thanks in advance.

sincerely

 

I have some more questions, now i get some more odd situations where an obvious answer cannot be given by solve. And a funtion cannot be plotted somehow. 

Here is the file. I tried to understand why, but it is not happening. They did it on purpose (i guess) to get simple questions, and show you that Maple sometimes does not have the answer right away. So you run into the "limitations" of the program right away so you are aware what could go wrong.

Find x with the help of a graph from: 2^x<1/2*x^2+2  

smartplot([2^x, (1/2)*x^2+2])

 

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

Warning, solutions may have been lost

 

RootOf(_Z^2-2*2^_Z+4)

(1)

"f(x):=2^(x)"

proc (x) options operator, arrow, function_assign; 2^x end proc

(2)

"g(x):=1/(2)x^(2)+2"

proc (x) options operator, arrow, function_assign; (1/2)*x^2+2 end proc

(3)

evalf(solve(f(x) = g(x), x))

Warning, solutions may have been lost

 

.8841764608-2.067784075*I

(4)

While the answer is obviously x=2 to be equal, and thus for values of x= (infinity;2> g(x) is larger, even if you would manually fill in the equetions,you get a value of 2. Both sides would get a solution of y=4. Somehow Maple does not give a straight answer.

``

2nd question
I have to plot this function, and it wont let me plot it..

"f(x):=(-2)^(x)"

proc (x) options operator, arrow, function_assign; (-2)^x end proc

(5)

plot(proc (x) options operator, arrow, function_assign; (-2)^x end proc)

 

I am not seeing a line, it is so odd.

``

Download Applied_Math_Part_1_questions_part_two.mw

The function

Hi!

The so called Haar system is given as the follwoing sequence of functions:

 

 

Someboy know how to code the above functions? For a given n, I think that the rpoblem is to find the numbre k in the above definition.

Many thanks in advance for you comments.

How to attach an m-file to a question?
Does it exist a rspecific repository where I can put an m-file? 

Suppose we have a function that we want to plot in different styles and to finally put all these different plots in one single plot.

When we use the plot command, it is easy to gather several plots in one single plot but when it commes to another special kind of plots (namely, DiscretePlot from DynamicSystems), there I am stuck.

Would you like help me to solve this problem? Thank you.

Here attached the corresponding worksheet.

altogether.mw

When I was drawing a plane graph, I found that the labels  of vertices were not displayed  and some edges even overlap when drawing because they were too close due to embedding.

restart:
with(GraphTheory):
g:=ConvertGraph("GsaCB{");
DrawPlanar(g,stylesheet=[vertexborder=false,vertexpadding=5,edgecolor = maroon,vertexcolor=gray,edgethickness=3])

So I thought that  option  Interactive  can adjust the position manually, but  at the same time I found that the style of  edges, such as the color and thickness, etc., is lost.  How to handle it? Is this a bug?

restart:
with(GraphTheory):
g:=ConvertGraph("GsaCB{");
DrawPlanar(g,stylesheet=[vertexborder=false,vertexpadding=5,edgecolor = maroon,vertexcolor=gray,edgethickness=3],layout=interactive)

Hello, ive got some trouble calculating this problem. Ive been looking at it for quite some time. I suspect you first need to differentiate to get the minimum value and then make it back to p. Time is ticking away, and i can just cant get it right. Its 2 questions out of some Dutch mathbook from 2007. It has a lot of Maple in it too. Just so to get a broad a view on maple as possible. I must say these maplebooks have quite the repertoirs. The other book "Advanced Problem Solving Using Maple" book turns you into some British chap. And this book:"toegepaste Wiskunde voor het hoger beroepsonderwijs deel 1"(translated applied math for higher job education part 1), turns you into the odd obnoxious Dutch mathematician... Well what can i say??

Here are the questions: 

1st Question:
For which values of p does the graph of the function: y=f(x)=(p*x^2)+3*p*x+1 have one intersection with the x-axis? When does it have two intersections with the x-axis? When does it have no intersections with the x-axis. 

2nd Question:
Given functions are: y=f(x)=(x^2)-6x+p+3, and y=g(x)=(4x^2)-(p-8)x+7. When do these functions have the same minimum value. Calculate p and the minimum value.

Greetings,

1st Question:
For which values of p does the graph of the function: y=f(x)=(p*x^2)+3*p*x+1 have one intersection with the x-axis? When does it have two intersections with the x-axis? When does it have no intersections with the x-axis.  

f(x) = p*x^2+3*p*x+1

f(x) = p*x^2+3*p*x+1

(1)

NULL

restart

2nd Question:
Given functions are: y=f(x)=(x^2)-6x+p+3, and y=g(x)=(4x^2)-(p-8)x+7. When do these functions have the same minimum value. Calculate p and the minimum value.

f(x) = x^2+p-6*x+3

f(x) = x^2+p-6*x+3

(2)

g(x) = 4*x^2-(p-8)*x+7

g(x) = 4*x^2-(p-8)*x+7

(3)

``

Download Applied_Math_Part_1_questions.mw

the function

I am looking for an output without denominator. I.e.:  2^(-1/3) instead of 2^(2/3)/2

Thank you

Given some intert expression like 4%*5 %+ 3 is there a way to progressively convert it to a non-inert expression(and evaluated expression)?

I'd like to see the stages without having to hard code it all. Value simply converts the expression all the way down. I'd like to see intermediate stages. Ideally it should followthe order of operations and hault when it reaches a fixed point(when the output equals the input).

e.g., value(exp, 3) will value the expression 3 times carrying out one one reduction of inert operations.

Hello

I have seen some examples of linear programming or integer programming in Maple. But, I am wondering how to solve a mixed-integer program when just some of the decision variables are integer and the rest are continuous? I would be thankful if you can share an example. 

Thanks

Hello all,

The following minimal worksheet leads to a "Kernel Connection Lost" message. At seemingly random times, I get a `System error, `, "bad id" message in the worksheet output instead.

Temporarily disabling ESET Internet Security did not help. Before I contact technical support, I would like to ask if there is anything obvious that I am overlooking that could cause this problem.

Thank you very much.

kernelopts(version);

`Maple 2021.1, X86 64 WINDOWS, May 19 2021, Build ID 1539851`

(1)

with(Iterator):

P := CartesianProduct([1,2,3,4],[1,2,3,4]):

add(p,p in P);


Download Minimal.mw

I don't know how overcoming this error . Thank you. MyPackage := module() export f1, f2; local loc1; option package; f1 := proc() loc1 end proc; f2 := proc( v ) loc1 := v end proc; loc1 := 2; end module: savelib('MyPackage'); Error, cannot open archive, C:\Program Files\Maple 2018\lib, for writing. restart; with(MyPackage); Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received MyPackage

x1^4 + x2^4 + 0.4*sin(7*x1) + 0.3*sin(4*Pi*x2) -1 = 0;
The task itself is not needed by anyone, it's just for rest and distraction from work.
(For example, this is not difficult to do with Draghilev's method.)




First 7 8 9 10 11 12 13 Last Page 9 of 2062