MaplePrimes Questions

How can i get mapple code for solving Fractional Patfial Differential Equation with Laplace, Adomian and New Iteration Method

Hello,

I want to draw a 2d directionfield with arrows for a differential equation system with three equations. I have tried the following: 

mu := 1/(365*80);
alpha := 20;
psi := 100;
varphi := 2;
K := 100;
theta := 0.5;
sigma := 0.001;

with(DEtools);
with(PDEtools);
beta := 0.3;
des := diff(S(t), t) = (psi + mu)*K - beta*S(t)*In(t) - (mu + varphi + psi)*S(t) + (theta - psi)*V(t) - psi*In(t), diff(V(t), t) = varphi*S(t) - sigma*beta*In(t)*V(t) - (mu + theta)*V(t), diff(In(t), t) = beta*S(t)*In(t) + sigma*beta*In(t)*V(t) - (mu + alpha)*In(t);

phaseportrait([des], [S(t), V(t), In(t)], t = 0 .. 100, [[S(0) = 70, V(0) = 0, In(0) = 30]], V = 0 .. 100, In = 0 .. 100, stepsize = 0.05, arrows = medium, scene = [V(t), In(t)], linecolour = sin(t*Pi/2))

The problem is, Maple plots only the curve for the initial values and not the arrows of the direction field. How can I solve this problem?

Tanks

How do I use ErrorPlots to put error bars on my scatter plot of data, AT THE LOCATION OF THE SCATTER PLOT DATA POINT? Below I write an example demonstrating how I plot the data and error bars using ErrorPlots.  When I use display to combine plots you clearly see that the errorbars are not on the scatter plot data points.  How do I give ErrorPlots, the x-y locations of the data points, so it knows to print the error bars on the location of the data points?  Is there a better approach to putting horizontal and vertical error bars onto scatter plot data?

Hello, 

I have some complicated calculations which result in a lot of 1e(-7) or even 1e(-12). These numbers greatly complicate the expersisions without adding any benefits. 

How do I instrcut Maple to round the calculations to the nearest decimal precision?

I tried "Digits" and "Rounding" and "interface(precisiondisplay)" but none of them get rid of something like 3.343^(-12)* expr. 

I still see such infistimal terms showing up. 

If you're wondering, I am exporting these symbolic terms to Matlab to be used as optimization functions. So, having these extra terms add unnecessary optimization steps. 

Thanks. 

A system of differential equations

But solution I want to express in terms of other specified function

How to dsolve to get a solution that in terms of a list of specified function? For example in terms of sin , cos , Bessel etc ?

Sol := [a(t) = sin(t) + cos(t) , b(t)= sin(t) ....]

I try to eliminate m  in                    X := (a*m^2 + 2*m^2*p + 2*p)/(2*m^2)
                                                      Y := a/(2*m)

eliminate({X, Y}, m);
 allvalues(m);
without results. How can I do ? Thank you.

The following code works in one worksheet but not in another (where it returns the error in the title). What could be the reason?

[> restart:
    with(plots):
    with(plottools):
    with(ColorTools):
    P:=display(polygonplot([[0,0],[0,1],[1,1],[1,0]], color=red,axes=none,style = polygon)):
[> exportplot("Test.jpg",P, plotoptions="height=30,width=30,quality=90");

In the worksheet (.mw) where it does work, I can't put the code in one command line unless the file is already there, in which case it overwrites.

- I create a function of 2 variables based on Procedures as follows:

Test := proc (a, b)

local z;

if not is({args}, set(numeric)) then return ('procname')('args') end if;

z := a*x^2+b*y^2-3*x+3*y+3;

minimize(z, location)[1]

end proc:

- The function calculates its value if given the specific values of the variables:

Test(2, 2.5) --> 0.975

- But somehow I can't graph this function with the following syntax:

plot3d(Test(a, b), a = 1.0 .. 5.0, b = 2.0 .. 3.0)

- MAPLe 17 issues the following notice: "Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct". And no graphs are drawn

In the same way, MAPLE 15 can plot the graph. Does anyone know what the problem is with MAPLE 2017 and how to fix it?

Sincerely thank

I noticed Maple changes 1/(4*(x-2)) to 1/(4*x-8)  when copying the output and pasting it back to the worksheet.  

But in the variable it does remain 1/(4*(x-2))  which is what I wanted, as I am going to look for this form later on and I do not want it expanded.

But I am curious why Maple does this. It is a little annoying when copying something from one worksheet to another and have it change.  Here is a small movie and the code to see it. 

Is there a way to prevent this automatic expansion?  Maple 2021.2 on windows 10

 

code

r:=(x^4-8*x^3+24*x^2-24*x+12)/((4*x^2*(x-2)^2)):
rf:=convert(r,fullparfrac,x);

I use worksheet interface and have my display settings as the following

Unless I'm missing something where are the closed integral symbols? 

I couldn't find them but you can create them if you wanted to.  Then I tried adding them to a palette with DocumentTools and couldn't get it to work. 

`∮` `∯` `∰`
                                                        

Creating the double and triple symbols can be done  easily by concatenating as many ∫  as you desire. But can't seem to add them to a palette.

DocumentTools:-AddPalette("Integral Symbols");

AddIcon("Closed Integral",`∮`)

I suppose you need to create a png file for that to work.  However the above would be simpler.

Maybe add functional closed integral operator symbols for the palette? 

how can i factor from 0.03 in this equation and show like the yellow equation

 

 

f := 0.03 - 0.03*cos(5.885*t)

restart;
with(LinearAlgebra):

l_1 := diff(x1(t), t) = 1/2*x1(t) - x2(t) + cos(4*t);
                 d          1                         
         l_1 := --- x1(t) = - x1(t) - x2(t) + cos(4 t)
                 dt         2                         

l_2 := diff(x2(t), t) = 3/2*x1(t) - 2*x2(t) - 1;
                    d          3                    
            l_2 := --- x2(t) = - x1(t) - 2 x2(t) - 1
                    dt         2                    

dsolve({l_1, l_2}, {x1(t), x2(t)});
    /          4               296              28          
   { x1(t) = - - exp(-t) _C1 + ---- sin(4 t) - ---- cos(4 t)
    \          3               1105            1105         

           /  1  \                                    
      + exp|- - t| _C2 + 2, x2(t) = -2 exp(-t) _C1 + 1
           \  2  /                                    

         93              36                /  1  \    \ 
      - ---- cos(4 t) + ---- sin(4 t) + exp|- - t| _C2 }
        1105            1105               \  2  /    / 


A := <<1/2 | -1>, <3/2 | -2>>;
                           [1            ]
                           [-  &uminus0;1]
                           [2            ]
                      A := [             ]
                           [3            ]
                           [-  &uminus0;2]
                           [2            ]

Eigenvectors(A, output = list);
              [                  [        /[2]\ ]]
              [[-1      /[1]\ ]  [        |[-]| ]]
              [[--, 1, { [ ] }], [-1, 1, < [3] >]]
              [[2       \[1]/ ]  [        |[ ]| ]]
              [                  [        \[1]/ ]]

NULL;

I assume, I am getting a result in the format of:

Which implies, that the eigenvalues from dsolve are -1/2 and -1, which are correct according to the eigenvalues gotten from the matrix A.

But the eigenvector for the eigenvalue -1/2 appears to be incorretly given by dsolve, I should get 2/3 and no -4/3 in the top axis of the V_lambda(-1). For the second row I am getting -2 and not 1. It appears that Maple has multiplied the eigenvector for the eigenvalue -1 with -2? Or am I missing something?

If I am not missing anything; what appears to cause this issue?

How to get a general expression here ?

restart

 

f(s) is the function value  expressed as a integral around s  (singularity)  of a complex function.

f(s) = (int(f(z)/(z-s), z))/(2*Pi*I)

f(s) = -((1/2)*I)*(int(f(z)/(z-s), z))/Pi

(1)

f(s) = int(f(z)/(z - s), z)/((2*Pi)*I):

"(->)"

diff(f(s), s) = -((1/2)*I)*(int(f(z)/(z-s)^2, z))/Pi

(2)

"(->)"

diff(diff(f(s), s), s) = -((1/2)*I)*(int(2*f(z)/(z-s)^3, z))/Pi

(3)

"((&DifferentialD;)^(n))/(&DifferentialD;n) f(s)   =  "
                                      

NULL

NULL

                 .......

quote : "Important consequence.

Above it actually says: "If there is a function f(s) that is somewhere analytic, then you can use such an integral as above to make a new function f '(s), which is also analytic there. And from that a new function f '' and so on.
That means something revolutionary for complex numbers:   "

 

================================

Question: how to get the "((&DifferentialD;)^(n))/(&DifferentialD;n) f(s)  "?
===============================

Note : again the form of the answers in Maple : Its not possible to force Maple to come up with this form of answer, ex

``  NULL

Download Maple_primes_bvraag_hoger_orde_singulariteit_henk_hofstede.mw

I do not understand why what I do in my first example does not work in the problem of integral. Can anyone help me? Thank you very much!

 

restart

assume(x > 0)

solve(x^2+3*x-4 = 0, x)

Warning, solve may be ignoring assumptions on the input variables.

 

1, -4

(1)

solve(x^2+3*x-4 = 0, x, UseAssumptions)

1

(2)
   

Download First_example_Maple.mw

 
 
 

f := proc (x) options operator, arrow; sin(100/(x+13)) end proc

proc (x) options operator, arrow; sin(100/(x+13)) end proc

(2.1.1)

g := proc (x) options operator, arrow; 10/(10*x+3) end proc

proc (x) options operator, arrow; 10/(10*x+3) end proc

(2.1.2)
   
 

A := fsolve(f(x) = g(x), x = 1.1)

1.049742001

(2.2.1)

B := fsolve(f(x) = g(x), x = 1.7)

1.676209051

(2.2.2)

C := fsolve(f(x) = g(x), x = 20)

19.35519742

(2.2.3)

 

 

assume(E > C)

solve(int(f(x)-g(x), x = C .. E) = 3, E, UseAssumptions)

Error, (in depends) too many levels of recursion

 

fsolve(int(f(x)-g(x), x = C .. E) = 3, E)

12.00027508

(2.3.1)

fsolve(int(f(x)-g(x), x = C .. E) = 3, E = 30)

28.05987548

(2.3.2)

La valeur de E cherchée est donc d'environ 28,06 unités.

Download Problem_of_integral.mw

This worksheet has an error when executing EulerLagrange.

How can this error be avoided?

Spring_Pendulum.mw

First 223 224 225 226 227 228 229 Last Page 225 of 2308