Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

 Hello everyone!

 I want to find all solutions of  following equations :

I used Maple 2019: 

solutions:=solve([abs(1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4)-1=0],[lambda]);
evalf(solutions)

The output is:

So we have two solutions. But when I use Matlab 2018, 
four solutions are returned.

syms lambda
eqn =abs(1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4)-1==0;
solx1=solve(eqn, lambda) 
%%
solx1 =
 root (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 1)
 root (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 2)
 roots (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 3)
 roots (z1 ^ 4-6 * z1 ^ 3 + 108 * z1 ^ 2 + 648 * z1, z1, 4)


 

solx3=solve(eqn, lambda,   'MaxDegree', 4)
double(solx3)
%%The solution is:
 -4.2681 + 0.0000i
 0.0000 + 0.0000i
 5.1340 -11.2012i
5.1340
+ 11.2012i

It is easy to check that  first two in Maple and Matlab are  same.

Who is right? Does Maple miss complex solutions?

 

 

 

 

 

 

 

 

Dear,

I need to attach CPU time to my iterations/Computations, please how do I obtain that in Maple. I tried 

a:=time () 

Iterations code

cputime:=time() -a; 

 

But the issue is that once I rerun the code, It produces different cpu time, kindly help me out here. 

 

Thank you.

First make sure that  and  are unassigned variables and then enter the Maple command

 

 

This tells Maple that  is a postive real number.  (You will see more on using "assume" later.)

 

Next, calculate the improper definite integral of

 

(8sin(x)+11cos(x))e^(−52cx)

 

for  from 0 to ∞ and assign this to the variable .  (Notice that Maple displays  as  to indicate it that an assumption has been made about .)

 

Finally calculate the limit of  times  as  tends to infinity and enter the limit in the box below.  (Enter your answer exactly using Maple syntax, not as a decimal.)

 

Can someone please help me in this? I cant really understand this.

 

An expression sequence is the underlying data structure for lists, sets, and function call arguments in Maple. Conceptually, a list is just a sequence enclosed in "[" and "]", a set is a sequence (with no duplicate elements) enclosed in "{" and "}", and a function call is a sequence enclosed in "(" and ")". A sequence can also be used as a data structure itself:

> Q := x, 42, "string", 42;
                           Q := x, 42, "string", 42

> L := [ Q ];
                          L := [x, 42, "string", 42]

> S := { Q };
                            S := {42, "string", x}

> F := f( Q );
                          F := f(x, 42, "string", 42)

A sequence, like most data structures in Maple, is immutable. Once created, it cannot be changed. This means the same sequence can be shared by multiple data structures. In the example above, the list assigned to and the function call assigned to both share the same instance of the sequence assigned to . The set assigned to refers to a different sequence, one with the duplicate 42 removed, and sorted into a canonical order.

Appending an element to a sequence creates a new sequence. The original remains unaltered, and still referenced by the list and function call:

> Q := Q, a+b;
                        Q := x, 42, "string", 42, a + b

> L;
                             [x, 42, "string", 42]

> S;
                               {42, "string", x}

> F;
                            f(x, 42, "string", 42)

Because appending to a sequence creates a new sequence, building a long sequence by appending one element at a time is very inefficient in both time and space. Building a sequence of length this way creates sequences of lengths 1, 2, ..., -1, . The extra space used will eventually be reclaimed by Maple's garbage collector, but this takes time.

This leads to the subject of this article, which is how to create long sequences efficiently. For the remainder of this article, the sequence we will use is the Fibonacci numbers, which are defined as follows:

  • Fib(0) = 0
  • Fib(1) = 1
  • Fib() = Fib(-1) + Fib(-2) for all > 1

In a computer algebra system like Maple, the simplest way to generate individual members of this sequence is with a recursive function. This is also very efficient if option is used (and very inefficient if it is not; computing Fib() requires 2 Fib() - 1 calls, and Fib() grows exponentially):

> Fib := proc(N)
>     option remember;
>     if N = 0 then
>         0
>     elif N = 1 then
>         1
>     else
>         Fib(N-1) + Fib(N-2)
>     end if
> end proc:
> Fib(1);
                                       1

> Fib(2);
                                       1

> Fib(5);
                                       5

> Fib(10);
                                      55

> Fib(20);
                                     6765

> Fib(50);
                                  12586269025

> Fib(100);
                             354224848179261915075

> Fib(200);
                  280571172992510140037611932413038677189525

Let's start with the most straightforward, and most inefficient way to generate a sequence of the first 100 Fibonacci numbers, starting with an empty sequence and using a for-loop to append one member at a time. Part of the output has been elided below in the interests of saving space:

> Q := ();
                                     Q :=

> for i from 0 to 99 do
>     Q := Q, Fib(i)
> end do:
> Q;
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584,

    4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811,

    ...

    51680708854858323072, 83621143489848422977, 135301852344706746049,

    218922995834555169026

As mentioned previously, this actually produces 100 sequences of lengths 1 to 100, of which 99 will (eventually) be recovered by the garbage collector. This method is O(2) (Big O Notation) in time and space, meaning that producing a sequence of 200 values this way will take 4 times the time and memory as a sequence of 100 values.

The traditional Maple wisdom is to use the seq function instead, which produces only the requested sequence, and no intermediate ones:

> Q := seq(Fib(i),i=0..99);
Q := 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,

    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,

    ...

    51680708854858323072, 83621143489848422977, 135301852344706746049,

    218922995834555169026

This is O() in time and space; generating a sequence of 200 elements takes twice the time and memory required for a sequence of 100 elements.

As of Maple 2019, it is also possible to achieve O() performance by constructing a sequence directly using a for-expression, without the cost of constructing the intermediate sequences that a for-statement would incur:

> Q := (for i from 0 to 99 do Fib(i) end do);
Q := 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,

    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,

    ...

    51680708854858323072, 83621143489848422977, 135301852344706746049,

    218922995834555169026

This method is especially useful when you wish to add a condition to the elements selected for the sequence, since the full capabilities of Maple loops can be used (see The Two Kinds of Loops in Maple). The following two examples produce a sequence containing only the odd members of the first 100 Fibonacci numbers, and the first 100 odd Fibonacci numbers respectively:

> Q := (for i from 0 to 99 do
>           f := Fib(i);
>           if f :: odd then
>               f
>           else
>               NULL
>           end if
>       end do);
Q := 1, 1, 3, 5, 13, 21, 55, 89, 233, 377, 987, 1597, 4181, 6765, 17711, 28657,

    75025, 121393, 317811, 514229, 1346269, 2178309, 5702887, 9227465,

    ...

    19740274219868223167, 31940434634990099905, 83621143489848422977,

    135301852344706746049

> count := 0:
> Q := (for i from 0 while count < 100 do
>           f := Fib(i);
>           if f :: odd then
>               count += 1;
>               f
>           else
>               NULL
>           end if
>       end do);
Q := 1, 1, 3, 5, 13, 21, 55, 89, 233, 377, 987, 1597, 4181, 6765, 17711, 28657,

    75025, 121393, 317811, 514229, 1346269, 2178309, 5702887, 9227465,

    ...

    898923707008479989274290850145, 1454489111232772683678306641953,

    3807901929474025356630904134051, 6161314747715278029583501626149

> i;
                                      150

A for-loop used as an expression generates a sequence, producing one member for each iteration of the loop. The value of that member is the last expression computed during the iteration. If the last expression in an iteration is NULL, no value is produced for that iteration.

Examining after the second loop completes, we can see that 149 Fibonacci numbers were generated to find the first 100 odd ones. (The loop control variable is incremented before the while condition is checked, hence is one more than the number of completed iterations.)

Until now, we've been using calls to the Fib function to generate the individual Fibonacci numbers. These numbers can of course also be generated by a simple loop which, together with assignment of its initial conditions, can be written as a single sequence:

> Q := ((f0 := 0),
>       (f1 := 1),
>       (for i from 2 to 99 do
>            f0, f1 := f1, f0 + f1;
>            f1
>        end do));
Q := 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,

    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,

    ...

    51680708854858323072, 83621143489848422977, 135301852344706746049,

    218922995834555169026

A Maple Array is a mutable data structure. Changing an element of an Array modifies the Array in-place; no new copy is generated:

> A := Array([a,b,c]);
                                A := [a, b, c]

> A[2] := d;
                                   A[2] := d

> A;
                                   [a, d, c]

It is also possible to append elements to an array, either by using programmer indexing, or the recently introduced ,= operator:

> A(numelems(A)+1) := e; # () instead of [] denotes "programmer indexing"
                               A := [a, d, c, e]

> A;
                                 [a, d, c, e]

Like appending to a sequence, this sometimes causes the existing data to be discarded and new data to be allocated, but this is done in chunks proportional to the current size of the Array, resulting in time and memory usage that is still O(). This can be used to advantage to generate sequences efficiently:

> A := Array(0..1,[0,1]);
                              [ 0..1 1-D Array       ]
                         A := [ Data Type: anything  ]
                              [ Storage: rectangular ]
                              [ Order: Fortran_order ]

> for i from 2 to 99 do
>     A ,= A[i-1] + A[i-2]
> end do:
> A;
                           [ 0..99 1-D Array      ]
                           [ Data Type: anything  ]
                           [ Storage: rectangular ]
                           [ Order: Fortran_order ]

> Q := seq(A);
Q := 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,

    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,

    ...

    51680708854858323072, 83621143489848422977, 135301852344706746049,

    218922995834555169026

Although unrelated specifically to the goal of producing sequences, the same techniques can be used to construct Maple strings efficiently:

> A := Array("0");
                                   A := [48]

> for i from 1 to 99 do
>    A ,= " ", String(Fib(i))
> end do:
> A;
                           [ 1..1150 1-D Array     ]
                           [ Data Type: integer[1] ]
                           [ Storage: rectangular  ]
                           [ Order: Fortran_order  ]

> A[1..10];
                   [48, 32, 49, 32, 49, 32, 50, 32, 51, 32]

> S := String(A);
S := "0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 \
    10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 134626\
    9 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 1\
    02334155 165580141 267914296 433494437 701408733 1134903170 1836311903 \
    2971215073 4807526976 7778742049 12586269025 20365011074 32951280099 53\
    316291173 86267571272 139583862445 225851433717 365435296162 5912867298\
    79 956722026041 1548008755920 2504730781961 4052739537881 6557470319842\
     10610209857723 17167680177565 27777890035288 44945570212853 7272346024\
    8141 117669030460994 190392490709135 308061521170129 498454011879264 80\
    6515533049393 1304969544928657 2111485077978050 3416454622906707 552793\
    9700884757 8944394323791464 14472334024676221 23416728348467685 3788906\
    2373143906 61305790721611591 99194853094755497 160500643816367088 25969\
    5496911122585 420196140727489673 679891637638612258 1100087778366101931\
     1779979416004714189 2880067194370816120 4660046610375530309 7540113804\
    746346429 12200160415121876738 19740274219868223167 3194043463499009990\
    5 51680708854858323072 83621143489848422977 135301852344706746049 21892\
    2995834555169026"

A call to the Array constructor with a string as an argument produces an array of bytes (Maple data type integer[1]). The ,= operator can then be used to append additional characters or strings, with O() efficiency. Finally, the Array can be converted back into a Maple string.

Constructing sequences in Maple is a common operation when writing Maple programs. Maple gives you many ways to do this, and it's worthwhile taking the time to choose a method that is efficient, and suitable to the task at hand.

1 discuss and show graphically the effects of decrease in wage on labor supply. if A, leisure is normal good. B, if leisure is inferior good.

How do I animate the cylinder width, or some variation of it as we trace it's path in the z-axes

with(plots);
with(plottools);
display([seq(cylinder([2, 2, 2], 3, i/10, capped = false), i = 1 .. 60)], insequence);

 

Hi,

I'm trying to create an agent vehicle which drives along a path of a uniform width, and finds the distance to the edge of the path directly ahead of it. Like this:

The aim is to somewhat simulate how far the agent can see down the road.

Since the thickness of a plot curve is unrelated to the units of the axis, and has no means of interacting with objects this would be no use.

I also considered shadebetween function, however this only can shade between the y values of 2 functions, so for a vertical curve it cannot produce any width to the path.

I then realised using parametric equations of form (x(t), y(t)) would likely make most sense and wrote some code which roughly gets the boundarys at a fixed distance from the centre path equation, by adding the x-y components of the reciprocal of the gradient:

For certain simple path equations such as this one, it roughly works other than the areas between which the boundary curves overlap themselves (I would need to find these points of intersection and break the curves up to remove these squigly inner bits). Any advice on this would be much appreciated cause this seems like it will be tricky, if not computationally heavy.

 

More annoyingly, due to the nature of the trig functions involved, for more complex graphs which include a vertical turning point, the left and right boundaries seem to swap over:

and

Clearly this is not the behaviour I had in mind.. and I'm not sure what I can do to fix it, I think maybe using piecewise trig may be a potential solution to avoid the jumping from + to -, though I'm not sure where I would put these breakpoints (I've tried just using abs(arctan(...)) with no luck).

 

If anyone could help wih this that would be really appreciated, or even suggest a better approach to this problem!

Thanks

 

[code] agentpath.mw

I just updated to Maple 2020

interface(version)

Standard Worksheet Interface, Maple 2020.0, Windows 10, March 4
   2020 Build ID 1455132

Physics:-Version()
         The "Physics Updates" package is not installed

My question is: For new Maple 2020 installation, should one go and install latest Physics package from the cloud, which I see is at version 619 now, or is it allready included in the new Maple 2020?

 

 

 

 

 

 

Help me to export data of 3d plot

Download export.mw

Dear,

 

Could you please help me with the following problem? 

I have a list, say, L:= [2,3,4,5]; 

and I need to find the position of several of its elements. However, when a apply the BinarySearch command I get a wrong return. For example, element >= 5:  BinarySearch(L, 5, `>=`);  

Maple returns 0

Element = 4: BinarySearch(L, 4, `=`); 

Maple returns 0

Element < 3: BinarySearch(L, 3, `<`); 

Maple returns 2. 

Obviusly, I'm doing something wrong. Could you please tell me what it is?

Many thanks for your help.

 

Maple 2020 offers many improvements motivated and driven by our users.

Every single update in a new release has a story behind it. It might be a new function that a customer wants, a response to some feedback about usability, or an itch that a developer needs to scratch.

I’ll end this post with a story about acoustic guitars and how they drove improvements in signal and audio processing. But first, here are some of my personal favorites from Maple 2020.

Graph theory is a big focus of Maple 2020. The new features include more control over visualization, additional special graphs, new analysis functions, and even an interactive layout tool.

I’m particularly enamoured by these:

  • We’ve introduced new centrality measures - these help you determine the most influential vertices, based on their connections to other vertices
  • You now have more control over the styling of graphs – for example, you can vary the size or color of a nodebased on its centrality

I’ve used these two new features to identify the most influential MaplePrimes users. Get the worksheet here.

@Carl Love – looks like you’re the biggest mover and shaker on MaplePrimes (well, according to the eigenvector centrality of the MaplePrimes interaction graph).

We’ve also started using graph theory elsewhere in Maple. For example, you can generate static call graph to visualize dependencies between procedures calls in a procedure

You now get smoother edges for 3d surfaces with non-numeric values. Just look at the difference between Maple 2019 and 2020 for this plot.

Printing and PDF export has gotten a whole lot better.  We’ve put a lot of work into the proper handling of plots, tables, and interactive components, so the results look better than before.

For example, plots now maintain their aspect ratio when printed. So your carefully constructed psychrometric chart will not be squashed and stretched when exported to a PDF.

We’ve overhauled the start page to give it a cleaner, less cluttered look – this is much more digestible for new users (experienced users might find the new look attractive as well!). There’s a link to the Maple Portal, and an updated Maple Fundamentals guide that helps new users learn the product.

We’ve also linked to a guide that helps you choose between Document and Worksheet, and a link to a new movie.

New messages also guide new users away from some very common mistakes. For example, students often type “e” when referring to the exponential constant – a warning now appears if that is detected

We’re always tweaking existing functions to make them faster. For example, you can now compute the natural logarithm of large integers much more quickly and with less memory.

This calculation is about 50 times faster in Maple 2020 than in prior versions:

Many of our educators have asked for this – the linear algebra tutorials now return step by step solutions to the main document, so you have a record of what you did after the tutor is closed.

Continuing with this theme, the Student:-LinearAlgebra context menu features several new linear algebra visualizations to the Student:-LinearAlgebra Context Menu. This, for example, is an eigenvector plot.

Maple can now numerically evaluate various integral transforms.

The numerical inversion of integral transforms has application in many branches of science and engineering.

Maple is the world’s best tool for the symbolic solution of ODEs and PDEs, and in each release we push the boundary back further.

For example, Maple 2020 has improved tools for find hypergeometric solutions for linear PDEs.

This might seem like a minor improvement that’s barely worth mentions, but it’s one I now use all the time! You can now reorder worksheet tabs just by clicking and dragging.

The Hough transform lets you detect straight lines and line segments in images.

Hough transforms are widely used in automatic lane detection systems for autonomous driving. You can even detect the straight lines on a Sudoku grid!

The Physics package is always a pleasure to write about because it's something we do far better than the competition.

The new explore option in TensorArray combines two themes in Maple - Physics and interactive components. It's an intuitive solution to the real problem of viewing the contents of higher dimensional tensorial expressions.

There are many more updates to Physics in Maple 2020, including a completely rewritten FeynmanDiagrams command.

The Quantum Chemistry Toolbox has been updated with more analysis tools and curriculum material.

There’s more teaching content for general chemistry.

Among the many new analysis functions, you can now visualize transition orbitals.

I promised you a story about acoustic guitars and Maple 2020, didn’t I?

I often start a perfectly innocuous conversation about Maple that descends into several weeks of intense, feverish work.

The work is partly for me, but mostly for my colleagues. They don’t like me for that.

That conversation usually happens on a Friday afternoon, when we’re least prepared for it. On the plus side, this often means a user has planted a germ of an idea for a new feature or improvement, and we just have to will it into existence.

One Friday afternoon last year, I was speaking to a user about acoustic guitars. He wanted to synthetically generate guitar chords with reverb, and export the sound to a 32-bit Wave file. All of this, in Maple.

This started a chain of events that that involved least-square filters, frequency response curves, convolution, Karplus-Strong string synthesis and more. We’ll package up the results of this work, and hand it over to you – our users – over the next one or two releases.

Let me tell you what made it into Maple 2020.

Start by listening to this:

It’s a guitar chord played twice, the second time with reverb, both generated with Maple.

The reverb was simulated with convolving the artificially generated guitar chord with an impulse response. I had a choice of convolution functions in the SignalProcessing and AudioTools packages.

Both gave the same results, but we found that SignalProcessing:-Convolution was much faster than its AudioTools counterpart.

There’s no reason for the speed difference, so R&D modified AudioTools:-Convolution to leverage SignalProcessing:-Convolution for the instances for which their options are compatible. In this application, AudioTools:-Convolution is 25 times faster in Maple 2020 than Maple 2019!

We also discovered that the underlying library we use for the SignalProcessing package (the Intel IPP) gives two options for convolution that we were previously not using; a method which use an explicit formula and a “fast” method that uses FFTs. We modified SignalProcessing:-Convolution to accept both options (previously, we used just one of the methods),

That’s the story behind two new features in Maple 2020. Look at the entirety of what’s new in this release – there’s a tale for each new feature. I’d love to tell you more, but I’d run out of ink before I finish.

To read about everything that’s new in Maple 2020, go to the new features page.

Does anyone have any ideas on why this integral (third equation) is taking so long to solve/plot? Are there any hints on how to speed up the process?

I'm running Maple 2019.1, and it was chugging away for about 5 minutes before I pulled the plug.

If I have 2.14 & 10 or 2.14 & 20 as my plot arguments, it takes about 3 s. After 20, it just doesn't want to work.

P1:=(r,R)->(2/Pi)*(arccos(r/(2*R))-(r/(2*R))*sqrt(1-(r/(2*R))^2))

J0:=(r,shk)-> BesselJ(0, 2*Pi*r*shk);

Jhk:=(s,shk,R)-> evalf((1/s)*Int(P1(r,R)*J0(r,shk)*sin(2*Pi*r*s), r=0..2*R));

plot(Jhk(s,2.14,38), s=0..5)

I'm attempting to use Maple to study Maxwell's Equations, but as a newbie to Maple, I quickly became stuck :-)

For some context, this link shows how it is possible to accomplish this using Mathematica:

https://www.wolfram.com/mathematica/new-in-10/inactive-objects/study-maxwells-equations.html

This is how I have attempted the same in Maple:

Maxwell's Equations

NULL

Initialise

 

restart

with(Physics[Vectors])

[`&x`, `+`, `.`, ChangeBasis, ChangeCoordinates, Component, Curl, DirectionalDiff, Divergence, Gradient, Identify, Laplacian, Nabla, Norm, Setup, diff]

(1.1)

Setup(mathematicalnotation = true)

[mathematicalnotation = true]

(1.2)

``

````

Maxwell's Equations

 

Maxwell_1 := Curl(E__field_(x, y, z, t)) = -(diff(B__flux_(x, y, z, t), t))

Physics:-Vectors:-Curl(E__field_(x, y, z, t)) = -(diff(B__flux_(x, y, z, t), t))

(2.1)

Maxwell_2 := Curl(H__field_(x, y, z, t)) = diff(D__flux_(x, y, z, t), t)

Physics:-Vectors:-Curl(H__field_(x, y, z, t)) = diff(D__flux_(x, y, z, t), t)

(2.2)

Maxwell_3 := Divergence(D__flux_(x, y, z, t)) = 0

Physics:-Vectors:-Divergence(D__flux_(x, y, z, t)) = 0

(2.3)

Maxwell_4 := Divergence(B__flux_(x, y, z, t)) = 0

Physics:-Vectors:-Divergence(B__flux_(x, y, z, t)) = 0

(2.4)

``

``

Constitutive Relations

 

Eq_1 := D__flux_(x, y, z, t) = epsilon*E__field_(x, y, z, t)

D__flux_(x, y, z, t) = varepsilon*E__field_(x, y, z, t)

(3.1)

Eq_2 := B__flux_(x, y, z, t) = mu*H__field_(x, y, z, t)

B__flux_(x, y, z, t) = mu*H__field_(x, y, z, t)

(3.2)

``

``

Solution

 

We need to get the Curl of H, to take the Curl of both side of Maxwell_1:

Curl(Maxwell_1)

Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -Physics:-Vectors:-Curl(diff(B__flux_(x, y, z, t), t))

(4.1)

Now substitute B for H:

subs(Eq_2, %)

Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -Physics:-Vectors:-Curl(diff(mu*H__field_(x, y, z, t), t))

(4.2)

OK, we manage to get Curl of H, so now we need to substitute the Curl of H with an expression in D.

subs(Maxwell_2, %)

Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -mu*Physics:-Vectors:-Curl(diff(H__field_(x, y, z, t), t))

(4.3)

Well that didn't work, so try to seperate the Curl of H so that we can substitute for D.``

collect(%, Curl(H__field_(x, y, z, t)))

Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -mu*Physics:-Vectors:-Curl(diff(H__field_(x, y, z, t), t))

(4.4)

simplify(%)

Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -mu*Physics:-Vectors:-Curl(diff(H__field_(x, y, z, t), t))

(4.5)

collect(%, Curl(H__field_(x, y, z, t)))

Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -mu*Physics:-Vectors:-Curl(diff(H__field_(x, y, z, t), t))

(4.6)

``

``

``

SortProducts(%, [H__field_(x, y, z, t)], totheleft)

SortProducts(Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -mu*Physics:-Vectors:-Curl(diff(H__field_(x, y, z, t), t)), [H__field_(x, y, z, t)], totheleft)

(4.7)

``

``

``

``

``

isolate(%, H__field_(x, y, z, t))

SortProducts(Physics:-Vectors:-Curl(Physics:-Vectors:-Curl(E__field_(x, y, z, t))) = -mu*Physics:-Vectors:-Curl(diff(H__field_(x, y, z, t), t)), [H__field_(x, y, z, t)], totheleft) = 0

(4.8)

``

``

``

``

``

``

NULL

NULL

``

 

I need to be able to rearrange equation 4.3 so that I can substitute for Curl of H using Maxwell_2.  Any suggestions would be gratefully received!
 

Download Maxwells_Equations.mw

Hi forum

I got a problem:

When i use these lines:

with(plots);
implicitplot(y = a*x + b, x = -10 .. 10, y = -10 .. 10, axis = [gridlines = [10, color = blue]]);



The vertical axis dosent stretches as far as i want it to.

The 'Axis Gridlines Properties' match the plot.

But the 'Axis Properties' dosent:


I can change the 'range' manually, by checking off the 'use data extend' box.
- But i need to use these plotting commands, very often.
Is it possible to write something in the plot-function, so i dosent need to do these corrections manually, every time i plot something?

Thank you in advance
Dan

Write a procedure approxInt that takes in a function f, a number of intervals
N, a left endpoint a, and a right endpoint b. Given these data, the procedure should split the
interval [a, b] into N subintervals and use the function f to estimate the area under the curve
using 
(a) Left endpoints,
(b) Right endpoints,
(c) Midpoints, and
(d) Trapezoids.

 Write another procedure called compareApproxInt that does the following:
  (a) Takes as inputs the function f, the endpoints a and b, and the number of subintervals N.
  (b) Calls the procedure approxInt in order to estimate the area under the curve of f(x) with
       N subintervals, with the four different approximations methods.
  (c) Returns four sentences:
       Using        , the approximate area under f is        . This method has a margin of error of         .

Test compareApproxInt with the functions 
 f1(x) = x
 f2(x) = x^2 ,
 f3(x) = x^3 - 4 · x^2 , and
 f4(x) = e^x ,
 each on the interval [-1, 1], with 10 subintervals.

 

First 453 454 455 456 457 458 459 Last Page 455 of 2097