Quantcast
Channel: MaplePrimes - Questions and Posts tagged with 2dmath
Viewing all 303 articles
Browse latest View live

How to do elementwise square root with units installed?

$
0
0

Units seem to be interfering with elementwise square roots.  I have with(Units[Standard]): in my .mapleprofile since I frequently use units.  I am working on a document which uses units but also requires computing the elementwise square root of a 2x1 vector.

If I boil this down to the very simple document attached, you can see that the units package is somehow interfering with the square root of a vector of numbers without units, but doing an elementwise square root doesn't work either.  I have tried removing the with(Units[Standard]): line in the startup file for this document and recomputing, but nothing changes.

I don't see how to do elementwise square roots in this situation.  Is there a workaround, or am I missing something?

Thanks,

Gerrit

Elementwise_Square_Root.mw


Shows 1D math when evaluating

$
0
0

Why is maple showing 1D math when evaluating?

Convert symbolic expression to text commands

$
0
0

I would like to convert a symbolic expression to text commands.  I recently used the expression palette to create a series summation; however, I was confused whether the sigma represented Sum vs sum.  I attempted to convert to string, but MAPLE attempts to evaluate the symbolic series prior to outputting the text commands.  Unfortunately, the evaluation of the series is computationally expensive & MAPLE will run out of memory.  I do not need MAPLE to evaluate the series.  How can it simply spell out the text commands that represent the symbolic form without resorting to evaluating the expression?


 

restart; T := M*tau; w := N*tau; M := Kappa*N; Ck := -2*(T*(4*tau^2*k^2*Pi^2*(4*tau-w)-w*T^2)*exp(-(1/2)*w/tau)*sin(w*Pi*k/T)+2*Pi*k*tau*(4*tau^2*k^2*Pi^2*(2*tau-w)-T^2*(2*tau+w))*exp(-(1/2)*w/tau)*cos(w*Pi*k/T)+4*Pi*k*tau^2*(T^2-(2*Pi*k*tau)^2))/(T^2+(2*Pi*k*tau)^2)^2

-2*(Kappa*N*tau*(4*tau^2*k^2*Pi^2*(4*tau-N*tau)-N^3*tau^3*Kappa^2)*exp(-(1/2)*N)*sin(Pi*k/Kappa)+2*Pi*k*tau*(4*tau^2*k^2*Pi^2*(2*tau-N*tau)-Kappa^2*N^2*tau^2*(2*tau+N*tau))*exp(-(1/2)*N)*cos(Pi*k/Kappa)+4*Pi*k*tau^2*(Kappa^2*N^2*tau^2-4*Pi^2*k^2*tau^2))/(Kappa^2*N^2*tau^2+4*Pi^2*k^2*tau^2)^2

(1)

sum(Ck*sin(2*Pi*k*x/T), k = 1 .. m)

``

``


 

Download convert_to_text_command.mw

strikethrough text on math

$
0
0

Hello Forum, 

I have a quick question i was hoping someone could help me with. 

Is there a way to put a line though "math" text like below

2*5+8 = 2*5+8

to visualize that to values cancels each other out? 

I hope someone can help, i can´t find anything on google

Thanks in advance 
IllIN - 

Invalid Neutral Operator Error

Problem with large document block (large expression) in maple

$
0
0

Hello, when I write a large document block in maple and want to do some operations, maple shows wait cursor (hourglass) for 2-3 minutes again and again. I attached a sample file below. 

I found out when maple is installed , javaw.exe also instal and when I open bellow file, the javaw use 15% of cpu and this cause maple works slowly. 

the attached file is just an example for large document block and I undrestand that it can be simplified. I want to know how to handle large expressions generally?

K-Euler_Lagrange.mw

 

Maple returning "_SELECTION" instead of a real output

$
0
0

I've been using Maple 2018 only a few days now, was mostly using Maple 2016 and never had any issues with returning an output (at least one that wasnt my fault), but with 2018 I've seen a few times where a simple task would return an output of "__SELECTION" and then my input. No idea what this is or why its happening and all I really need to know is how to prevent it from happening. If its something with my preferences or settings that needs to be addressed, thats fine, but otherwise this is getting to be a real pain. See attached 

 

Split a 2D input execution group

$
0
0

Is it possible to split an execution group containing 2D input?
(without conversion to 1D which destroys the format).
Using F3 or the menu seems to work only for lines with a prompt.
But usually an execution group has a single prompt; lines with prompts appear e.g. when two execution groups are joined (with F4).
Is copy&paste the only solution?


Unknown Error For no apparent reason

pde solution is required

$
0
0

sys[1] := [-(diff(u(x, t), t, t))-(diff(u(x, t), x, x))+u(x, t) = 2*exp(-t)*(x-(1/2)*x^2+(1/2)*t-1), u(x, 0) = x^2-2*x, u(x, 1) = u(x, 1/2)+((1/2)*x^2-x)*exp(-1)-((3/4)*x^2-(3/2)*x)*exp(-1/2), u(0, t) = 0, eval(diff(u(x, t), x), x = 1) = 0]

 

Error, (in PDEtools:-ToJet) found functions to be rewritten in jet notation, {u(1, t)}, having different dependency than the indicated in [u(x, t)]

 

what is the meaning of above error and how to resolve this to get the solution from pdsolve command?

Maple won't solve\print function value

$
0
0

I can't get my answer when type Dx := Ky(0) , what to do?What the problem?

 

Worksheet:

 

 

An amusing bug(ette)

$
0
0

In an unrelated thread, I provided the OP with some 1-D code, which contained the Array definition

TC:= Array(0...1001, fill=0)

Note the existence of three '.' characters in the range specification. This was a typo on my part, or my '.' key bounced, or something. The code containing the above definition "worked" with no problem, which, presumably, was why I didn't notice.

The Maple help does state (my emphasis)

Note that more than two dots in succession are also parsed as the range (..) operator.

although I wasn't making use of this fact - I just screwed up when typing the original.

The OP preferred to use 2-D input, and used cut-and-paste to transfer the above code, resulting in 2-D input, which is where the fun started. It seems(?) that when using 2-D input, more than two dots in succession is only interpreted as a straightforward range, if the total number of dots is even.

If the total number of dots is odd, then it appears(?) as if the 'final' dot is associated with the second number in the range as a 'decimal point', (so producing .1001 in the above example). This is then 'coerced/rounded' to an integer - ie it becomes '0', and the above Array definition is interpreted as

TC:= Array(0..0, fill=0)

Consequences in the following code are left to your imagination

Worth an SCR?

 

 

 

Loop appearing before else in an if statement - semicolon requirement

$
0
0

Does anyone know why the following gives an error of invalid loop statement termination?

if true then
  for i from 1 to 2 do
  end do
else
end if

while putting a semicolon after `end do' fixes it.

This seems to only occur in if else statements, when end do appears directly before the else

internal representation

$
0
0

Hello people in mapleprimes,

I installed maple 2018 Japanese version.
And, with solve(x^2-1,x), its solution is expressed as _EXPSEQ(1, -1)

I know this expression is an internal represantation.
How can I have maple answer as 1, -1?

Thanks in advance.

Addition: my pc is mac osx 10.13.6.
 

 

 

How to simplify a complex expression?

$
0
0

Dear All. I am a beginner of using Maple. My calculation gives a complex expression as shonw in Line (23) in the attached figure. I used "simplify" to simplify it. However, the result is not the simplest form. The numerator can be divided by the denominator. Could you please tell me what command I can use to further simplify the expression? Any of your help is highly appreciated!

Best regards,

Toby


Logic &xor error

$
0
0

with(Logic):

logic := a &xor b

Then I get 'Error, invalid neutral operator'.

However the other &xxx operators in Logic do not error.

What am I doing wrong, or is it a bug?

the standard xor operator does work though.

I do remember copy and pasting

thoughts and answers please. At the moment I have resorted to the form without the '&'

 

How to write mathematical expressions as unexecutable text in a document?

$
0
0

Hi there,

Guess the title is already the full question. I want to write mathematical expressions in 2D math within a text segment of my Maple 15 document, but it should not be recognised as an execution group. How can I do this?

Cheers!

How can I prevent Maple from messing up entered expressions?

$
0
0

Hello

 

Please have a look at the attached picture. I create an expression, hit enter, then Maple auto simplifies it causing a mess. How do i prevent Maple from manipulating expressions?

Thanks

 

https://www.dropbox.com/s/o12crq77b0qffmy/maple_auto_simp.jpg?dl=0

 

 

 

Jacobian Method not worlking

Trouble with nested loop and 2-level indices in dsolve

$
0
0

Below is a picture of my code and the errors that have arisen when I have tried to use a 2-level indice within a loop and dsolve. I will also paste in the code below.

restart;

with(PDEtools); umain := 1-exp(-y)+sum(A^i*u[i](y, z), i = 1 .. 4); vmain := -1+sum(A^i*v[i](y, z), i = 1 .. 4); wmain := sum(A^i*w[i](y, z), i = 1 .. 4); pde[main] := diff(vmain, y)+diff(wmain, z); pde[main[2]] := vmain*(diff(wmain, y))+wmain*(diff(wmain, z))-(diff(wmain, y$2));

for i to 1 do pde[i] := coeff(pde[main[2]], A^i) = 0; w[i](y, z) := sum(sol[i, k](y)*sin(k*z), k = 1 .. i); for j to i do sys__i__j := [-(diff(sol__i__j(y), y))-(diff(sol__i__j(y), y$2)) = coeff(pde[main[2]], sin(j*z)), sol__i__j(0) = 0, sol__i__j(infinity) = 0]*dsolve([-(diff(sol__i__j(y), y))-(diff(sol__i__j(y), y$2)) = coeff(pde[main[2]], sin(j*z)), sol__i__j(0) = 0, sol__i__j(infinity) = 0]); assign(op(0, sol__i__j*y)) = unapply(dsolve(sys__i__j), op(dsolve(sys__i__j))) end do end do

Viewing all 303 articles
Browse latest View live


Latest Images