## RK-4 for System of Nonlinear ODE'S...

Hello Everyone;

Hope you are fine. My problem is convert into nonlinear system of ODE's and further i need make the code of apply rk-4 for the formulated ODE's. Kindly guide me. The file is attached. I am waiting for your kind response.

Thanks

Question3.mw

 >
 >
 >
 >
 >
 >

## How to have Maple solve this simple ODE?...

The worksheet here shows a couple of failed attempts at coaxing Maple to calculate the general solution of a pretty simple second order ODE.  I have also included the expected solution which I  have calculated by hand.  Perhaps I am missing a key trick.  Any ideas?

The ODE that I am actually interested in is significantly more complex. The one in the worksheet is a much simplified "bare bones" specimen that exhibits the issue that I am facing.

Attempt to solve with Heaviside

 > restart;
 > de := diff(u(x),x\$2) = Heaviside(x - a)*u(x);

dsolve fails:

 > dsolve(de);

Attempt to solve with piecewise

 > restart;
 > de := diff(u(x),x\$2) = piecewise(x < a, 0, 1)*u(x);

 > dsolve(de);

Error, (in dsolve) give the main variable as a second argument

 > dsolve(de, u(x));

Error, (in dsolve) give the main variable as a second argument

 >
 >

The solution is easy to calculate by hand

We just solve the (quite trivial) DE over the intervals  and x>a

separately, and patch the two solutions by requiring the continuity

of  and  at .  We get

 > sol := piecewise(x < a,         x*c[1] + c[2],         ((a*c[1] + c[1] + c[2])*exp(x))/(2*exp(a)) + ((a*c[1] - c[1] + c[2])*exp(-x))/(2*exp(-a)));

## Select Values in Matrix...

Hello,

I am fairly new to Maple. Suppose I have two Matrices

A := <<true, false, true> | <true, false, true> | <false, false, false>>

B := <<1, 2, 6> | <3, 4, 7> | <22, 33, 44>>

and apply select(A, B)

Why do I receive [[[(),3,22],[(),(),()],[(),7,44]]] instead of [[[1,(),6],[3,(),7],[(),(),()]]] as a result? I just want to select every element of B where A is true.

I appreciate any insight.

## algebra,factoring...

This is a simple algebraic, but I would like to know how to officially solve the problem,

I tried factor(6*a+12*b+18*c); it simply outputs what I input.

I tried primpart(6*a+12*b+18*c) ; the output is: a+2b+3c

I tried content(6*a+12*b+18*c), the output is 6

What I'm looking for an output is, 6*(a+2*b+3*c), this is the answer my Algebra book is looking for, I also get this answer by

using my HP Graphing Calculator, but I'm unable to get the answer from Maples. Can anyone help?

 >
 >
 >
 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >

## Who invented the inverse model approach?...

Inverse kinematics can be done in several ways (this webinar gives a very good overview https://www.youtube.com/watch?v=X0OZ9EM6dns). A effective and simple method is to run a model in reverse direction. This can’t be done with causal modeling tools, where information flow is fixed by design (https://de.maplesoft.com/support/help/MapleSim/view.aspx?path=MapleSimUserGuide/Chapter01).

Inverse kinematics, which is possible with acausal modeling tools, is only an example for running a model in the reverse (i.e., inverted) direction.

Without success, I tried to find a reference who first came up with that elegant approach.

Anyone knows more?

## complex numbers...

Hi

I have a problem with calculating complex numbers in Maple.

I type forexample 8(cos(Pi/2)+I*sin(Pi/2)) and I get 8, I should get 8I

Should I re-install Maple or edit my settings?

best regards

## solve equations...

Hi everybody,how can I solve these equations in Maple and plot the answers? tnx...

eq1 := diff(x(t), t) = 35*(y-x)

eq2 := diff(y(t), t) = -x*z-7*x+28*y

eq3 := diff(z(t), t) = x*y-3*z

## How can I extract the coordinates from spacecurve...

Hi Dear All,

I need to extract the coordinates from spacecurve commend. For example;

h3:=spacecurve([-x,-y,z],omega=ws..0,color=green,thickness=5):
h4:=spacecurve([-x,y,z],omega=ws..0,color=blue,thickness=5):

Where, omega is a parameter difinening x, y, z.

## Remove the ODE's from set with same variables...

Hello Everyone;

Hope you are fine. I have set of following ODE's;

Every variable has two ODE's. I need to take one ODE for each variable. Is that any way?
I am waiting for your kind response.

Thanks

Question2.mw

## Bad solution display from LPSolve...

The solution from LPSolve shown in the worksheet below is displayed very weirdly:

1. The first element is rounded to 3 significant digits.
2. The variable indices have decimal points.
3. Zeros are displayed as just decimal points with no digit 0.

Closer inspection (with, say, lprint) will reveal that the weirdness is only with the prettyprinting; the actual entries are as expected.

 > restart:
 > <(kernelopts,interface)(version), interface~([prettyprint, typesetting])[]>;

 > (a,b,c):= (2,4,5):
 > X:= Matrix((a,b), symbol= x): Y:= Matrix((b,c), symbol= y): Z:= Matrix((a,c), symbol= z):
 > RegionC:= <5, 15, 8, 10, 15>:
 > RegionA:= <90, 75>:
 > RegionB:= <35, 20, 30, 15>:
 > Cost1:= <     2, 1, 3/2,   3;   5/2, 2, 7/2, 3/2 >:
 > Cost2:= <     3/2, 4/5, 1/2, 3/2,   3;       1, 1/2, 1/2,   1, 1/2;       1, 3/2,   2,   2, 1/2;     5/2, 3/2, 3/5, 3/2, 1/2 >:
 > Cost3:= <     11/4, 7/2, 5/2, 3,   5/2;        3, 7/2, 7/2, 5/2, 2 >:
 > CapB:= add(X[i], i= 1..a) <=~ RegionB:
 > CapA:= add([..,j], j= 1..b+c) <=~ RegionA:
 > ReqC:= add([i], i= 1..a+b) >=~ RegionC:
 > InEqOutB:= add([i], i= 1..a+c) =~ 0:
 > Cons:= seq~({CapA, CapB, ReqC, InEqOutB}):
 > Sol:= Optimization:-LPSolve(Cost__Total, Cons, assume= nonnegative);

 >

## is it possible to keep GAMMA(1,x) as is and not r...

I am reading some expressions from file.

In the file, it is written as GAMMA(-1,x). When read into Maple using the read file command, it shows as  1/x*Ei(2,x)

I know these are the same mathematically. But I am translating these expressions to sagemath. in sagemath, Ei only accepts one argument.

Now the translator sees Ei in the input, then it keeps it as Ei as it does not know it was the GAMMA with two arguments,  which gives an error when used by sagemath since sagemath only has the one argument version of Ei.

If Maple would keep GAMMA(-1,x) as is, then the translator will just translate it to gamma(-1,x) which works in sage.

To keep things simple, I was wondering if there an option to tell Maple to keep the input as GAMMA(-1,x) and not rewrite to Ei?

Otherwise I would have to now parse each Ei to see if it is the two argument version or the one argument version, and use gamma  for the 2 argument version to keep sage happy which will complicate things for me.

```expr:=GAMMA(-1,x)

Ei(2, x)/x```

Maple 2022.1

## How to built a pentagon...

restart;
with(plots);
with(plottools);
Vdot := proc (U, V)local i: add(U[i]*V[i], i = 1 .. 2) end proc:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end proc:
ngon := n -> local i; [seq([cos(2*Pi*i/n), sin(2*Pi*i/n)], i = 1 .. n)]:
theta := (2*Pi)/5;
poly := [seq([cos(k*theta), sin(k*theta)], k = 1 .. 5), datatype = float];
Ii := [0, 1/2]:
H := [-1/4, 0]:
r := dist(Ii, H):
theta := (2*Pi)/5:
p1 := pointplot([seq([cos(k*theta), sin(k*theta)], k = 0 .. 5)], symbol = solidcircle, color = red, symbolsize = 10):
p2 := textplot([seq([cos(k*theta), sin(k*theta), cat("M", k)], k = 0 .. 4)], align = ["above", "right"]):
cir1 := circle([0, 0], 1/2, color = green,dashdot:):
cir2 := circle([-1/4, 0], r, color = black):
cir3:=circle([0,0],1,color=red):
display([p1, p2, cir1, cir2, cir3,polygonplot(poly, thickness = 5, color = blue, transparency = 0.95)], axes = normal);
Why this error , Thank you.

I am trying to rotate a region about the y-axis. However, entering axis=vertical rotates it about the z-axis. I have also tried interchanging the x and y values. However, it produces the same output. The left image is what I'd like to rotate about the y-axis. The code below is for the right image. How would I revolve this region about the y-axis? Please help.

VolumeOfRevolution(2*x^2 + 1, x = 0 .. 1, labels = [x, y, z], output = plot, axis = vertical, orientation = [270, 0, 90])

## Summation Question...

I am transitioning from Mathcad to Maple, and I am currently working on some code to do a Gage R&R study using ANOVA. The attached math is from the 4th edition of the MSA manual. I got it to work in Mathcad, although I had to adjust things since Mathcad does not support 3D matrices.

My input matrix is a 2D matrix in which each cell contains a vector of measurements. In Maple, I seem to be able to make a 3D array with my data (if it is easier).

I have searched for a couple days for the right syntax. I am able to get the "right" number for SSA using my 2D Mathcad matrix--at least it is really close--but the other varibles are woefully off.

I would appreciate it if someone could at least point me in the right direction. Thanks.

Jno.

 First 46 47 48 49 50 51 52 Last Page 48 of 2177
﻿