MaplePrimes Questions

Hi,

I have made a maple file that is meant to test Maple's solution to the nonlinear pendulum equation.  I am doubtful that Maple is finding the correct solution.  Could someone comment on my analysis?

test_nonlinear_pendulum_solution.mw

As I upgraded to Maple 2021 I quickly noticed the missing text format bar. I've looked into the view tabs and done a bit of search, but I can't figure out how to get it back. I mostly use document mode, so I miss it dearly.

Thank you in advance.

Am calculating using the binomial function, and want to plot the output values. So, need to create a vector and plot the values.

Here is the loop,

x := RandomVariable(Binomial(45, 0.9));
for i from 0 to 45 do
    ProbabilityFunction(x, i);
end do;

Cannot seem to find a way to get the output into a list or vector, and then implement the dataplot function .

Many thanks in advance....

Dear Sir/Madam

I want to use explore commad in order to make a plot along with calculating another expression,simultaneously.

The following command does not give the desired result:

Explore([plot(a*x^2+b*x^3,x=-2..2),evalf(a^2+b^2)],parameters = [a = -1.00..1.00, b=-1.00..1.00],placement=right );

I want to have a diagram which depends on both "a" and "b" together with evaluation of the expression "a^2+b^2" somewhere near the control markers.

I appreciate if any one could help.

Thank you very much

 

I am interested in the inner workings of SignalProcessing:-Convolution. I know I can list it with a higher setting of verboseproc:

with(SignalProcessing);
interface(verboseproc=3); # actually, 2 is enough here...
eval(Convolution);

and get

Obviously the real work happens in IPP:-Convolution, but that seems unknown. How can I list that??

TIA,

Mac Dude

Convolution.mw

Dear Maple users

I have created a simple Explore command in order to display what happens with a Planck curve when the temperature T increases - using the slider. Especially I would like to show how the maximum of the curve lies in relation to the visible spectrum from 400-700 nm, that is from 4*10^-7 to 7*10^-7. My idea was to somehow have this wavelength interval representing the visible spectrum displayed behind the Planck curve as a vertical rectangle. If it was a fixed plot, I could do it using the display command, but is it possible to add an extra plot to an Explore command?

I have uploaded the temporary Maple file and an image to show my intention (I don't expect the coloring ...)

Planck_curve.mw

 

Maybe someone can help?

Kind regards,

Erik V.

 

Dear respected colleagues,

The first "ex 1" and second "non linear" codes were sent to me by a colleague. It would be appreciated if they can be modified to look like the one saved with "K2 Nonlinear_Fang 2009". Thank you all for your time and best regards.

ex1.mw

non_linear.mw

K2_Nonlinear_Fang_2009.mw

 

 

 

In mathematica, CommunityGraphPlot attempts to draw the vertices grouped into communities. 

g = Graph[{1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, 
   3 \[UndirectedEdge] 4, 1 \[UndirectedEdge] 4, 
   1 \[UndirectedEdge] 5, 5 \[UndirectedEdge] 6, 
   5 \[UndirectedEdge] 7, 7 \[UndirectedEdge] 8, 
   8 \[UndirectedEdge] 9, 7 \[UndirectedEdge] 9}, 
  VertexLabels -> "Name"];
ged = {{6, 7, 8, 9}, {5}, {1, 2, 3, 4}};# Gallai-Edmonds decomposition
CommunityGraphPlot[
 HighlightGraph[g, FindIndependentEdgeSet[g], 
  GraphHighlightStyle -> "Thick"], 
 Thread[Labeled[ged, {"D(g)", "A(g)", "C(g)"}]], PlotTheme -> "Web"]

This function is very useful, for example, if I get a partition of vertices, such as the gallai-Edmonds decomposition below, I use  CommunityGraphPlot to easily see the overall layout of the graph. I don't know if Maple has a corresponding function.

PS: The Gallai-Edmonds decomposition of a graph g is the partition {D(g),A(g),C(g)} of its vertices, where D(g) consists of every vertex v for which there exists a maximum matching of g that misses v, A(g) consists of every vertex v that is not in D(g) but neighbors some vertex in D(g) and C(g) consists of all remaining vertices.

Hello

I purchased the license of Maple 2019 and I am using the same version up to now. I am wondering if I download the latest version, can I use the former license? When I click on "check for updates" there is nothing for updating but when I want to run a Maple file written in the latest version, I face an error. 

Dear every one.

I want to solve an implit function. But maple give me this. How can i solve z(x,y) by maple?

Hello colleagues

I use Maple 2020 and I try to create Histogram of Poisson with a mean 200 [ Histogram(Sample(Poisson(200),10000))]. but I get an incorrect result in the form of a histogram as uniform distribution. But In my Maple 2015 I get a correct result.what is the problem?

Dear every one.

Hi.

I am trying to set up an surface integral in maple. I have been trying with the Student[VectorCalculus] package.

I have also tried to use the task template for surface integral over a disk but somehow I mess up huge time.

I have tried to find help online and in maple help center. If anyone would please take time to explain the syntax of the SurfaceInt command id be happy.

Can someone teach me how to solve this exam.

Thank you.

 

The function subsets is an iterator for generating the power set of a set one set at a time.  I wanted to get iterators for all  k -subsets , so I modified the codes for getitng  iterators for the power set in the help document.

with(combinat):
k:=3:
S := subsets({1,2,3,4,a}):
while not S[finished] do
   s1:=S[nextvalue]();
 if nops(s1)=k then 
    print(s1);
    end if;
end do:

 

 

 

But I think the iterative process is done in filtering, which means that maple runs out of power sets. It may not save time.

And of course we can use "choose" to get all k-subsets at once.

choose({1,2,3,4,a}, 3)

 

So my question is is there an iterator that takes less time to get a k-subset .

I prefer the iterator to the choose function because it saves memory and makes it easy to set some breakpoints in the program to terminate the process.

Another interesting thing is that I looked at the source code when use print and it didn't seem to show.

interface(prettyprint=2):
print(combinat:-subsets)

 

 

 

 

Hello, 

I use Syrup to solve for the transfer function of a circuit, and in particular, the voltage at a given node.   If I use the "trans" option, the solution generates the expected result, in the expected format.  Syrup solves the differential equations and the resulting time domain equation is as expected.

If I then use the 'AC'  option, I get the result in the s-domain.  I then solve for the step response, and take the inverse Laplace transform.  The solution is given in terms of sinh and cosh.   

If I plot the voltage in either solution as a function of time, the plots are identical.  So, the sinh/cosh solution must be somehow simplifiable so that it "looks" like the time domain solution I get from the transient analysis.
 

restart

with(inttrans)

with(Syrup)NULL

with(DynamicSystems)

interface('displayprecision' = 8)

with(plots)

NULL

assum := R1::real, C1::real, R2::real, C2::real, R1 > 0, R2 > 0, C1 > 0, C2 > 0, t::realvin::real, vin > 0

vin::real, 0 < vin

(1)

ckt := [vin(5), Rm(1.0*10^7), Cm(1.8*10^(-11), ic = 0), `&//`(R1(9.*10^6), C1(1.5*10^(-11), ic = 0)), `&//`(R2(1.*10^6), C2(1.5*10^(-11), ic = 0))]

[vin(5), Rm(10000000.0), Cm(0.1800000000e-10, ic = 0), `&//`(R1(9000000.), C1(0.1500000000e-10, ic = 0)), `&//`(R2(1000000.), C2(0.1500000000e-10, ic = 0))]

(2)

NULL

NULL

ckt1 := [vin(0), Rm(0.10e8), Cm(0.18e-10, ic = 2.5), `&//`(R1(0.9e7), C1(0.15e-10, ic = 2.25)), `&//`(R2(0.1e7), C2(0.15e-10, ic = .25))]

[vin(0), Rm(0.10e8), Cm(0.18e-10, ic = 2.5), `&//`(R1(0.9e7), C1(0.15e-10, ic = 2.25)), `&//`(R2(0.1e7), C2(0.15e-10, ic = .25))]

(3)

Draw(ckt)

Solution doing Transient Analysis

deqs, rest := Solve(ckt, 'tran', 'returnall')

sol1 := dsolve(deqs):

Reassign rest to include the solution.

rest := eval(rest,sol1):

Compute the voltage across the capacitor Cm.

tmp1:=simplify(eval(v[Cm](t), sol1));

(1/32164)*(-415*8041^(1/2)-40205)*exp((100000/459)*(-119+8041^(1/2))*t)+5/2+(1/32164)*(415*8041^(1/2)-40205)*exp(-(100000/459)*(119+8041^(1/2))*t)

(4)

evalf[5]((1/32164)*(-415*8041^(1/2)-40205)*exp((100000/459)*(-119+8041^(1/2))*t)+5/2+(1/32164)*(415*8041^(1/2)-40205)*exp(-(100000/459)*(119+8041^(1/2))*t))

-2.4070*exp(-6389.4*t)+2.5000-0.92993e-1*exp(-45461.*t)

(5)

solve(tmp1=2.5*(1-exp(-1)),t)

p10 := plot(tmp1, t = 0 .. 0.00050000, color = 'blue', linestyle = 'dash')

p10 := plot(tmp1, t = 0 .. 0.5e-3, color = 'blue', linestyle = 'dash')

 

Solution from AC analysis:

sol, rest := Solve(ckt, 'returnall')

vnode2 := eval(v[2], sol)

1000000*(27*s+1000000)/(1377*s^2+71400000*s+400000000000)

(7)

1000000*(27*s+1000000)/(1377*s^2+71400000*s+400000000000)

(8)

``

NULLNULL

Impulse Response

temp1 := invlaplace(vnode2, s, t)

(1000000/24123)*exp(-(700000/27)*t)*(3*8041^(1/2)*sinh((100000/459)*t*8041^(1/2))+473*cosh((100000/459)*t*8041^(1/2)))

(9)

"(->)"

41.454*exp(-25926.*t)*(269.02*sinh(19536.*t)+473.*cosh(19536.*t))

(10)

Step Response

temp2 := invlaplace(vnode2/s, s, t)

5/2-(5/16082)*exp(-(700000/27)*t)*(83*8041^(1/2)*sinh((100000/459)*t*8041^(1/2))+8041*cosh((100000/459)*t*8041^(1/2)))

(11)

p1 := plot({temp2, (1-exp(-1))*2.5}, t = 0 .. 0.5e-3)

temp3 := solve(temp2 = (1-exp(-1))*2.5, t)

0.1505875131e-3

(12)

p2 := plot([temp3, temp3], [0, 2.5])

display({p1, p10, p2})

 
   

``

What is going on?  Where are the sinh and cosh terms in the solution coming from and why wont it simplify so that it looks like the other solution if they are identical?  Is there something special I need to do when using the invlaplace function?

Thanks!

Download help_maple.mw

 

 

My Maple worksheet, which was working fine a few days ago, suddently cannot be modified. Many elements on the top bar (execute group, execute entire worksheet, insert maple prompt) are grayed out. Additionally I cannot edit any commands in the worksheet; clicking a command does not show any cursor and keyboard input does nothing.

Apparently I have entered some kind of read-only mode. I do not know how I did this. Meanwhile, if I start a new worksheet I can edit and execute as normal.

How do I revert my worksheet back to normal?

First 255 256 257 258 259 260 261 Last Page 257 of 2308