MaplePrimes Questions

Hello all

 

I need to calculate the distance L in a curvefitting. The calculation has been made in MathCAD and I need to copy it in Maple, but I cant seem to make it solve.

Here are the two pictures of my problem:

 

In MathCAD:

In Maple:

 

Here is the copy of Maple:

V[Ed13] := [257.184, 230.4, 184.3, 138.2, 92.2, 46.1, 0];
 = 
    V[Ed13] := [257.184, 230.4, 184.3, 138.2, 92.2, 46.1, 0]


x[12];
 = 
            [-149, 208, 567, 925, 1283, 1642, 2000]

L[1] := x[13];
 = 
         L[1] := [0, 358, 717, 1075, 1433, 1792, 2150]


solve(V[Rdc] = CurveFitting:-ArrayInterpolation(x[12], V[Ed13], L[1]), L[1]);
 = 
Error, invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, algebraic, relation(algebraic), ({list, set})({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received 153.25 = [HFloat(246.00524369747902), HFloat(211.1381615598886), HFloat(164.98435754189944), HFloat(118.92625698324022), HFloat(72.93816155988858), HFloat(26.784357541899443), HFloat(-19.315642458100548)]

Find 
L[1];


Answer should be 808
 

 

Hope someone can help as I honestly have no idea how to do this :-)

Hi, 

Moving the sliders clean the plot.
Does any one can show me how to fix this (PS: this piece of code is a part of a procedure whose arguments are RV and SliderRanges and I need this unusual coding to make the procedure generic ... at least I guess so)

Thanks in advance


 

restart:

interface(version);

`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`

(1)

with(Statistics):

RV   := RandomVariable(Normal(a, b)):
law  := [attributes(RV)][3]:
pars := law:-Parameters;

[a, b]

(2)

SliderRanges := [-5.0..5.0, 1.0..3.0]:
[seq(pars[k]=SliderRanges[k], k=1..numelems(pars))]

[a = -5.0 .. 5.0, b = 1.0 .. 3.0]

(3)

f := PDF(RV, x);
# Explore(plot(f, x=-3..3), parameters=[seq(pars[k]=SliderRanges[k], k=1..numelems(pars))]);

(1/2)*2^(1/2)*exp(-(1/2)*(x-a)^2/b^2)/(Pi^(1/2)*b)

(4)

 


 

Download Explore_Problem.mw

I want to calculate the below triple integral numerically. I tried different methods and reduced accuracy but nothing works.

Anyone capable?

Thanks

 

restart;
Digits := 15;
with(VectorCalculus);
v1 := <0, 0, 1>;
v2 := <sin(theta2), 0, cos(theta2)>;
v3 := <VectorCalculus:-`*`(sin(theta3), cos(phi3)), VectorCalculus:-`*`(sin(theta3), sin(phi3)), cos(theta3)>;
v1v2 := CrossProduct(v1, v2);
v2v3 := CrossProduct(v3, v2);
DotProduct(v1v2, v2v3);
(simplify(VectorCalculus:-`*`(%, VectorCalculus:-`*`(Norm(v1v2), Norm(v2v3))^VectorCalculus:-`-`(1))) assuming (0 < theta2, theta2 < Pi, 0 < theta3, theta3 < Pi));
evalf(VectorCalculus:-`*`(Int(VectorCalculus:-`*`(arccos(%), sin(theta3)), [theta2 = 0 .. Pi, theta3 = 0 .. Pi, phi3 = 0 .. VectorCalculus:-`*`(2, Pi)], epsilon = 0.001, method = _d01akc), VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, Pi), 2), Pi), 4), Pi)^VectorCalculus:-`-`(1)));

Hi,

I am new to Maple. I am attempting to find the asymptotic expression for the confluent Heun function (HeunC) under certain set of parameters (i.e. still symbolic and possibly complex, but less parameters compared to the general case).

From the literature, it seems that for certain cases there are such closed analytic expressions.

Is it possible to find such in Maple? I tried using "asympt", which gave me a generic error (...unable to compute series).

Thank you very much.

Hey there

I have noticed that after some time, Maple freezes and says in the bottom left corner that it is "evaluting" when I  copy something. This is becoming unbearable, as it makes every assignment take a lot longer. Why is this happening, and how can I prevent it?

Hi

I need your help with this problem. The date protocol here in the antipodes is day/month/year.

I get this error...Maybe there is an alternative.

does_not_evaluate.mw

 

Hi i want to perform double looping for different values of i and j as follows.. when i remove the summation sign it works, but no output obtained otherwise.

 

for j from 0 to 4, for i from 1 to 4 do u[i,1]:=-h*(&sum;)int(K2ij*gj(t),t=0..x)od;

 

Each K2ij and gj(t) have their own values defined above in the worksheet.

hello this is so simple, and so essentiel in mathprograms, but i cannot get it to work.

how do i run two list through a function that needs both variables.

i am gessing a "for loop" is the solution, but i dont really care if its a loop or not, just i am getting a solution to the problem.

the two list is of equal lengt.

example:

my variables

A:=[1,2,3,4,5,6,7,8,9,10]:

B:=[10,20,30,40,50,60,70,80,90,100]:

my function

C:=A*E/4*pi*B

E is a konstant, in this case E=5

Need

so i want another list object. D to contain all the results from the calculation. as a list.

so D:=[]  needs to be filled with result.

for every run/calculation it takes, one of each of the variables F.ex.

C:=1*E/4*pi*10 and insert into the list D,

then C:=2*E/4*pi*20 and insert into the list D

then C:=3*E/4*pi*30 and insert into the list D.

and so on.

 

thx in advance

 

Can someone show me how to increase the font size in the button? 

I branched from here https://www.mapleprimes.com/questions/228527-Code-For-A-Clock-Within-Maple -- no auto links inserted. 

Lets say I would like to construct a procedure which 

a) Allowed to call the view option from plots:-display by a different name? Lets say zoom. 

So the argument would PlotGraph(x^2,zoom = [-5..5,-5..5]) 

Is that by any means theoretically possible ? 

PlotGraph := proc(func::anything, zoom := {(x::range := a .. b), (y::range := c .. d)}) plots:-display(plot(func), view = zoom); end proc;

PlotGraph(x^2 , zoom = [0 .. 1, -5 .. 5]);


Error, (in plots:-display) expecting option view to be of type {"default", list({"default", range(realcons)}), range(realcons)} but received zoom = [0 .. 1, -5 .. 5]

 

So question to forum what am I doing wrong? 
 

 

Hello, I have a question about converting an output of a expression into another.

solve({-1 < x, 0 < 2*x/(x^2 - 1), x < 1}, {x})

This is my expression which evaluates into: solve({-1 < x, 0 < 2*x/(x^2 - 1), x < 1}, {x}). Which is correct but I would like it to be a classic range, more precisely (-1,0).

Is there a command to do that?

Thanks,

David.

I am looking to solve the following ode numerically for different values of w, 

diff(y(x),x)^2=y(x)^(-3w-1), along with the intial condition y(1)=1. 

i have tried to solve this for w=-1/3 and w=0 but i am getting the error:

Error, (in DEtools/convertsys) unable to convert to an explicit first-order system

I believe it probably has something to do with the fact that the first derivative is squared but i dont know how to procede with fixing that. 

 

Any help would be greatly appreciated. 

I  can't seem to get a solution to the following problem.  Can anyone see where I am going wrong I thought I had correct IBC s but they may be wrong/ill-posed

Melvin
 

Two 1-D coupled Burgers equations - semiclassical case: remove O( `&hbar;`^2) terms for u(x,t) but retain O( `&hbar;`) terms for v(x,t):

In the quantum case, there are two coupled quantum Burgers equations, which each include the quantum potential terms.  As in the classical case above, we apply constant external forces Fuand Fv.  Our aim is to display the profiles of u(x, t) and v(x, t) as strings on x, t space.

#hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants

hBar := 1:m := 1:Fu := 0.2:Fv := 0.1: # set constant values - same as above ...consider reducing

At O( `&hbar;`^2) the real quantum potential term is zero, leaving the classical expression:

pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;

diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = .2

(1)

On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( `&hbar;`) terms and so is retained as semiclassical

pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;

diff(v(x, t), t)+u(x, t)*(diff(v(x, t), x))-(1/2)*(diff(diff(u(x, t), x), x))+v(x, t)*(diff(u(x, t), x)) = .1

(2)

By inspection of the derivatives in above equations we now set up the ICs and BCs for u(x, t) and "v(x,t)."

The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for v and for u, notably a 1st derivative BC term for u.

IBCu := {u(x,0) = 0.1*sin(2*Pi*x),u(0,t) = 0.5-0.5*cos(2*Pi*t),D[1](u)(0,t) = 2*Pi*0.1*cos(2*Pi*t)};# IBC for u

{u(0, t) = .5-.5*cos(2*Pi*t), u(x, 0) = .1*sin(2*Pi*x), (D[1](u))(0, t) = .6283185308*cos(2*Pi*t)}

(3)

IBCv := {v(x,0) = 0.2*sin((1/2)*Pi*x),v(0,t)=0.2-0.2*cos(2*Pi*t)};# IBC for v

{v(0, t) = .2-.2*cos(2*Pi*t), v(x, 0) = .2*sin((1/2)*Pi*x)}

(4)

IBC := IBCu union IBCv;

{u(0, t) = .5-.5*cos(2*Pi*t), u(x, 0) = .1*sin(2*Pi*x), v(0, t) = .2-.2*cos(2*Pi*t), v(x, 0) = .2*sin((1/2)*Pi*x), (D[1](u))(0, t) = .6283185308*cos(2*Pi*t)}

(5)

pds:=pdsolve({pdeu,pdev},IBC, time = t, range = 0..0.2,numeric);# 'numeric' solution

_m2606922675232

(6)

The following quantum animation is in contrast with the classical case, and illustrates the delocalisation of the wave form caused by the quantum diffusion and advection terms:

T:=2; p1:=pds:-animate({[u, color = green, linestyle = dash], [v, color = red, linestyle = dash]},t = 0..T, gridlines = true, numpoints = 2000,x = 0..0.2):p1;

2

 

Error, (in pdsolve/numeric/animate) unable to compute solution for t>HFloat(0.0):
matrix is singular

 

p1

(7)

Note that this plot also shows that there are regions in which pIm < 0,  pRe > 0.  Below, the 3D plot of u(x,t),v(x,t) also illustrates the quantum delocalisation of features:

T := 3; p1 := pds:-plot3d({[u, shading = zhue], [v, color = red]}, t = 0 .. T, x = -0.1e-2 .. 2,transparency = 0.0, orientation = [-146, 54, 0], title = print("Coupled quantum solution \n u(x, t) zhue, v(x,t) red", numeric),scaling=unconstrained):p1;

3

 

"Coupled quantum solution 
 u(x, t) zhue, v(x,t) red", numeric

 

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.0):
matrix is singular

 

``


 

Download BurgersEqns.mw

Here it is:

#hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants
hBar := 1:m := 1:Fu := 0.2:Fv := 0.1: # set constant values - same as above ...consider reducing
At O( 
`&hbar;`^2;
) the real quantum potential term is zero, leaving the classical expression:
pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;
              / d         \           / d         \      
      pdeu := |--- u(x, t)| + u(x, t) |--- u(x, t)| = 0.2
              \ dt        /           \ dx        /      
On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( 
`&hbar;`;
) terms and so is retained as semiclassical
pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;
                                                     2         
         / d         \           / d         \   1  d          
 pdev := |--- v(x, t)| + u(x, t) |--- v(x, t)| - - ---- u(x, t)
         \ dt        /           \ dx        /   2    2        
                                                    dx         

              / d         \      
    + v(x, t) |--- u(x, t)| = 0.1
              \ dx        /      
By inspection of the derivatives in above equations we now set up the ICs and BCs for 
u(x, t);
 and 
v(x,t).;
The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for 
v;
 and for 
u;
, notably a 1st derivative BC term for 
u;
.
IBCu := {u(x,0) = 0.1*sin(2*Pi*x),u(0,t) = 0.5-0.5*cos(2*Pi*t),D[1](u)(0,t) = 2*Pi*0.1*cos(2*Pi*t)};# IBC for u
          IBCu := {u(0, t) = 0.5 - 0.5 cos(2 Pi t), 

            u(x, 0) = 0.1 sin(2 Pi x), 

            D[1](u)(0, t) = 0.6283185308 cos(2 Pi t)}
IBCv := {v(x,0) = 0.2*sin((1/2)*Pi*x),v(0,t)=0.2-0.2*cos(2*Pi*t)};# IBC for v
                   /                                 
          IBCv := { v(0, t) = 0.2 - 0.2 cos(2 Pi t), 
                   \                                 

                             /1     \\ 
            v(x, 0) = 0.2 sin|- Pi x| }
                             \2     // 
IBC := IBCu union IBCv;
         /                                 
 IBC := { u(0, t) = 0.5 - 0.5 cos(2 Pi t), 
         \                                 

   u(x, 0) = 0.1 sin(2 Pi x), v(0, t) = 0.2 - 0.2 cos(2 Pi t), 

                    /1     \  
   v(x, 0) = 0.2 sin|- Pi x|, 
                    \2     /  

                                           \ 
   D[1](u)(0, t) = 0.6283185308 cos(2 Pi t) }
                                           / 
pds:=pdsolve({pdeu,pdev},IBC, time = t, range = 0..0.2,numeric);# 'numeric' solution
                     pds := _m2606922675232
The following quantum animation is in contrast with the classical case, and illustrates the delocalisation of the wave form caused by the quantum diffusion and advection terms:
T:=2; p1:=pds:-animate({[u, color = green, linestyle = dash], [v, color = red, linestyle = dash]},t = 0..T, gridlines = true, numpoints = 2000,x = 0..0.2):p1;
                             T := 2
Error, (in pdsolve/numeric/animate) unable to compute solution for t>HFloat(0.0):
matrix is singular
                               p1
 

The help page for dsolve,numeric,events says that "A call to a procedure-form dsolve numeric procedure" can return the time that one or more events fired by coding the eventfire option.

I do not know how to code for this.

Please provide a simple example of a procedure-form dsolve numeric with an event that exhibits this feature.

 

sys.pdf

Can  anyone help me to proof that this solution is the right solution to this system ?

First 604 605 606 607 608 609 610 Last Page 606 of 2424