Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

Hi Community, I have solved the some basic expression by using built in command to get solution. Now i am interested to view the solution stp by step to show  my students of grade 10.

restart

t := x^6+2*x^5-3*x+2+(2*x^6-4*x+8)

3*x^6+2*x^5-7*x+10

(1)

p := 2*x^2-x-10

2*x^2-x-10

(2)

factor(p)

(x+2)*(2*x-5)

(3)

s := 2*x^2-x-10

2*x^2-x-10

(4)

solve(s = 0, {x})

{x = 5/2}, {x = -2}

(5)

sqrt(x-4) = 4

(x-4)^(1/2) = 4

(6)

solve(sqrt(x-4) = 4, {x})

{x = 20}

(7)

s := (x^2-9)/(x^2-2*x-15)

(x^2-9)/(x^2-2*x-15)

(8)

simplify(%)

(x-3)/(x-5)

(9)

(3*x^2-5*x)*(4*x^2+7*x+4)

(3*x^2-5*x)*(4*x^2+7*x+4)

(10)

expand(%)

12*x^4+x^3-23*x^2-20*x

(11)

``

Solving a system of equations:

x+2*y = 4

x+2*y = 4

(12)

3*x+4*y = 6

3*x+4*y = 6

(13)

solve({x+2*y = 4, 3*x+4*y = 6}, {x, y})

{x = -2, y = 3}

(14)

abs(3*x+3) = 12

3*abs(x+1) = 12

(15)

``

solve(abs(3*x+3) = 12, {x})

{x = 3}, {x = -5}

(16)

``

Download Help_to_view_solution_step_by_step.mw

I know you can filter a dataframe by putting constraints on the numeric columns. However, I would like to sort and filter based upon a given string in a column, is this possible? I cannot immediately find this in the help files. Thank you for your assistance.QuestionDataFrame.mw

Dear power users, I probably have 2 dummy questions, which I show in the attached worksheet. 

1. it looks to me that the equation can be further simplified than done by maple

2. is there a quick way in cleaning up the array by replacing the strings by something as NaN (not a number) so that I can use the array for numeric calculations?

Thank you for helping me out     Download Questions.mw

simplify((x^2-2)/(x-sqrt(2)))

(x^2-2)/(x-2^(1/2))

(1)

why is the above not simplifying to x+sqrt(2)

x+2^(1/2)

(2)

``

How can I replace the strings in the matrix below by something like NaN (not a number) so I can use it for further numeric calculations?

 

Error, invalid assignment

"dat:=[[124.0,124.0,22.0,2.2],[130.0,160.0,20.0,4.4],[130.0,129.0,26.0,4.3],[119.0,115.0,21.0,">2,6"],[136.0,129.0,30.0,4.9],[118.0,126.0,24.0,2.9],["NA / 101",115.0,20.0,3.0],[130.0,118.0,21.0,2.4],[95.0,94.0,25.0,3.4]]"

 

``

Download Questions.mw

Hey I’m trying to define a variable as the solution to a second order nonhomogeneous differential equation with an initial value problem.

I have tried the method below, but it doesn’t work.

N__1 := dsolve([diff(y(x), x, x) + 3*diff(y(x), x) + 2*y(x) = x^2 + 5, eval(y(x), x = 0) = 1, eval(diff(y(x), x), x = 0) = 1], y(x))

It kind of works it gives me the expression below

N__1 = y(x) = (3*exp(-2*x))/4 + 17/4 - (3*x)/2 + x^2/2 - 4*exp(-x)

But I need the expression for N__1 to define some initial values for N__2 and so on, what I have tried that doesn’t work is.

C := eval(N__1, x = 200)

N__2 := C   - Just because nothing much is happing on this interval

And it gives me the following expression for N2

N__2 := y(200) = (3*exp(-400))/4 + 78817/4 - 4*exp(-200)

I then make a piecewise function to make a function which I can plot, which use to work.                         

N := piecewise(0 <= x and x <= 200, N__1, 200 <= x and x <= 1000, eval(N__2, x = x - 200))

But when I’m trying to plot N maple gives me a warning message.

plot(N, x = 0 .. 1000)

Warning, expecting only range or variable x in expression piecewise ………………..  to be plotted but found name y.

If I define N__1 as the solution to the differential equation, then it works just fine.

N__1 := (3*exp(-2*x))/4 + 17/4 - (3*x)/2 + x^2/2 - 4*exp(-x)

But that I’m not interested in, because that will require a lot of copy paste all the time.

Thank you in advance.

Hey I’m trying to shift a function horizontally to the right.

I have the following 3 functions:

V1 := -x

V2:= -2*x + 4.95

V3:= -x + 1.665

Function V2 I want to shift l_1 to the right, and V3 I want to shift l_1 + l_2 to the right.

I know I can do this manually by define the functions:

V2:= -2*(x-l_1) + 4.95

V3:= -(x-l_1-l_2) + 1.665

Where l_1:=1.665 and l_2:=4.95

Is there a way to do this without typing it manually?

By the way it’s only for plotting, so it’s not necessary for me to actually define them, if there is a way to do it within a plot some how.

Thank you in advance.

Hey I’m trying to define the antiderivative for a function:

g(x) = 1

G(x) = int(g(x),x)

When I then type:

G(x) and press enter Maple gives me G(x) = x which of course is correct

But I can’t type:

G(5)

Then it gives me the error message:

Error, (in int) integration range or variable must be specified in the second argument, got 5

How to fix this?

I know I can type G(x) = x manually but I’m not interested in doing so, because in my document I’m going to have a lot of antiderivatives.

Thanks in advance.

How to make the matrix construction by points animated?
I sketched this code - it doesn't work(((
 

a := Matrix([stoimostyM, izmeniya]);
plots[animate](plot, [a[n, m]], n = 1 .. 2970, m = 1 .. 2, numpoints = 50, frames = 100);
Error, bad index into Matrix

4/(9*n + 7*sqrt(n)) <= 4/(9*n + 7*sqrt(n))

Hi I am trying to plot in maple but the plot I get is not the one I expect I have attached the maple file and the expected image below. Any help would be appreciated. 

 

 

This is perhaps a stupid question, when I use the ScientificConstant package and call a constant e.g. R this works smoothly. But when I assign the value to a variable to use it in a calculation Maple complains about the units. However, if I assign the constant manually (without using GetConstant) Maple has no issues in solving. Is there a trick to use such a constant in a calculation? I have attached a worksheet to illustrate my question better. Thank you in advance for helping me out.GetConstantQuestion.mw

Hello

I want to declare 'd' as a constant.

Please tell me how to declare 'd' as a constant.

I need the Infinitesimals(Lie group analysis) of the system of PDE. I have attached below the system of PDE in MAPLE given below.MAPLE_Help.mw

Thank you

Hello,

I am trying to solve the following system of odes where the unknowns are xhat, yhat, uhat and vhat. They depend on the variables (x, y, u, v, a_1, a_2, a_3, a_4, f(x)) where f(x) is an arbitrary function and I want to solve it with respect to a_1. The RHS has f(x) and its derivative with respect to x. The dsolve function fails to solve the ode when I add f(x) at the list of variables. 

restart;
vars := x, y, u, v, a_1, a_2, a_3, a_4, f(x);
sys_ode := diff(xhat(vars), a_1) = a_3*x + a_1, diff(yhat(vars), a_1) = a_2 - a_4*y + f(x), diff(uhat(vars), a_1) = a_3*u + 2*a_4*u, diff(vhat(vars), a_1) = a_4*v + diff(f(x), x)*u;

initvars := x, y, u, v, 0, a_2, a_3, a_4, f(x);
ics := xhat(initvars) = x, yhat(initvars) = y, uhat(initvars) = u, vhat(initvars) = v;
solution_a1 = dsolve([sys_ode, ics], [xhat, yhat, uhat, vhat]);

Can anyone help regarding this issue ?

Hello!

how to find the solutions of a system of recursive equations? And the plot too.

I tried but...

B := rsolve({a(0) = 0, a(i) = (1 + 10^(-5)*(0.01*(i - 1) - 0.007)/0.0001)*a(i - 1) + 0.1*10^(-5)*c(i - 1), c(0) = 0, c(i) = 0.01*10^(-5)*(i - 1)/0.0001*a(i - 1) + (1 - 10^(-5))*0.1*c(i - 1)}, {a(i), c(i)}, 'genfunc'(t));
B := rsolve({a(i) = (0.9983000000 + 0.001000000000 i) a(i - 1)

   + 0.000001000000000 c(i - 1), 

  c(i) = 0.001000000000 (i - 1) a(i - 1) + 0.09999900000 c(i - 1)

  }, {a(i), c(i)}, genfunc(t))

rsolve_for_system_of_recursive_equations.mw

thanks

I am trying to start writing small procedures in Maple. In the attached document I do not get an answer and I do not understand why. For clarity I have also added a working construct from another program so anyone willing to help me out can better understand what I am after.

Thanks in advance for assistance.

CDI_T_cor.mw

3 4 5 6 7 8 9 Last Page 5 of 44