MaplePrimes Questions

University of Costa Rica     

Course: SP-1493

Student: Lic. Marcus Vinicio Mora Salas

Instructor: Dr. Erick Castellón Elizondo

 

Assigment 7

Description

   

e2.301

 

Express sin(theta) in terms of

i)   cos(theta), and

ii)  tan(theta), and

iii)  cot(theta);

the latter part is more difficult than the preceding two parts.  Each square root that appears is assumed to include both positive and negative roots; for arbitrary angle theta, the sign of the root is given by the quadrant of the angle.  Test your results with a numerical value of theta. In an analogous manner, each circular trigonometric function is expressible in terms of any other circular trigonometric function, but possible ambiguity of signs of square roots exists.   

eq := [sin(theta)^2 + cos(theta)^2 - 1,

Error, invalid input: convert expects its 2nd argument, form, to be of type name, but received -sin(theta)

sin(theta)

 

Download tareaclase8.mw

In this question I have to do what I said in the title. Really I don't understand the question very well, or at least I don't understand the objetive, because if I use solve I get an error and if I use isolate I only can get sin in terms of cos and even wen I could get all answer, I needed a starting point, it's say an identity to solve the exercise. Therefore, my question is, Maple have some comand to express trigonometric functions in terms of another without introducing identities?

Seems to me informative to see a earth-like surface on a sphere and in particular from the zeta function.
Another simple complex function will do it also.

Note: i saw a  3D picture with a colored sphere , where you can see zeroes and poles on the surface of the sphere
A colored complex function is that hard to make with Maple too?: it are all polar coordinates as complex points in the complex plane. 
The angle is standing for hue and the magnitude is standing for the lightness 

Hi

I am trying to get a family of curves on one graph. Each curve a different colour and labeled

P=2, Q=0 , P=2,Q=1 , etc

mmcdara 's proposal for inspiration?

https://www.mapleprimes.com/questions/233088-How-Do-I-Plot-A-Function-Of-Two-Variables

Family_of_curves_plot.mw

I looked at combinat package but it is too large and could not find what I want.

I'll explain with example to make it easy. Given n=2 I want to generate all possible arrangements of sets of length n where each element can be either +1 or -1. So it will be 2^n=4 possible arrangements

And for n=3 then want to generate all possible sets of length 3 where each element can be either +1 or -1 so it will be  2^n=2^3=8 possible sets

And for n=4 it will be 2^n=16 possible arrangements

And so on. I picked [+1,-1] in the above as an example.   

Is there a command to do this in Maple?  I can ofcourse program it using using loops and if's and so on. But thought there might be a command in Maple package which will generate all these possibles sets. Either as list of lists or Matrix or any other format. 

 


 

``

K := proc (x, t) options operator, arrow; 5*x+3*t end proc; 1; f := proc (x, t) options operator, arrow; 2*x+3*t^2 end proc

proc (x, t) options operator, arrow; 5*x+3*t end proc

 

proc (x, t) options operator, arrow; 2*x+3*t^2 end proc

(1)

"g(x,t):=f(x,t)+(∫)[0]^(t)K(x,t-u) ⅆW(u)  "
where W(u) is wiener process   
how to solve this integeral at t=.5sec and plot sample paths for x=0..5

``


 

Download stochastic_integral.mw

Hello there, 

When I tried to write an expression with the '1d' subscript, I found that it was automatically translated as '1.'. The following worksheet shows an example. Is there any chance to preserve the expression as I intended to see?

restart;

eq3_130:= Psi[fd] = L[ffd]*i[fd]+L[f1d]*i[1d]-L[ad]*i[d];

Psi[fd] = -L[ad]*i[d]+L[f1d]*i[1.]+L[ffd]*i[fd]

(1)

 

Download Q20220121.mw

Really , the complex plotting possibilities in Maple are difficult to decipher. 

I tried something, but  in general the visualizing for me is not that easy

Now i must look at the complexplot where i got a circle for  the complexplot(sin(x + I), x = -Pi .. Pi) example ?

Hello,

     Can you enter debug in a worksheet vs a proc?   

    I have a for loop that is crashing in the middle with a bad calculated number to provide to a thermoprops function.   Is there a way to single step through a for loop (1500 iterations) to see which line is getting tripped up?  I can not post the worksheet as it's private development.   The question is generic to any "for loop".

   I have also tried "porting" into a code edit region, but still can not enter the debugger mode.   Is proper debugger only available if I turn the "for loop" into a proc?   If yes, what is the availability of packages called right after restart for the worksheet for a proc, or do all the pre-calcs developed in the worksheet and the packages to be variables fed into the proc or packages re-declared insde a new proc ???

  Sorry if this is a trival question.

Thanks in advance,
Bill

I solve numerically a DAE system whose independent variable is named t and the dependent variables are d[1](t), ..., d[n](t).
I would like to to 2D or 3D plots of the solutions and color the resulting curve using a function f(...) of the remaining dependent variables.

Here is a simple example.

restart

with(plots):

0

(1)

sys := {
   diff(x(t), t) = v(t)
  ,diff(v(t), t) = cos(t)
  ,x(0) = -1
  ,v(0) = 0

  ,px(t) = piecewise(x(t) >=0, 1, -1)
  ,pv(t) = piecewise(v(t) >=0, 1, -1)
}:

sol := dsolve(sys, numeric):

 

odeplot(sol, [t, x(t), v(t)], t=0..4*Pi)
 

 

# I would like to color this space curve depending on the signs of x(t) and y(t)
#
# for instance, f being a "color function"
f := proc(s)
  local a, b:
  if s::numeric then
    a := round(eval(px(t), sol(s))):
    b := round(eval(pv(t), sol(s))):
    return piecewise(a+b = 2, "Green", a = 1, "Red", b = 1, "Blue", "Gold")
  end if:
end proc:

SOL := proc(s)
  if s::numeric then
    eval([t, x(t), v(t)], sol(s))
  end if:
end proc:


# I would like to make something like this to work

plot3d(SOL(s), s=0..4*Pi, colorfunc=f(s)):  #... which generates a void plot


 

# In some sense a continuous version of this

opts := symbol=solidbox, symbolsize=20:
display( seq(pointplot3d({SOL(s)}, opts, color=f(s)), s in [seq](0..6, 0.1)) );

 

 

Download coloring.mw

How can I fix (if possible) the syntax in the command 

plot3d(SOL(s), s=0..4*Pi, colorfunc=f(s)):

???

Thanks in advance

Has someone tried to connect Grasshopper with Maple yet?

Grasshopper is a visual programming environment on Rhino.

https://en.wikipedia.org/wiki/Grasshopper_3D

Try to calculate the values for the Zeta(z) on the critical line in symbolic form and also as a plot 

Both i did not yet succeed in 

f:=z->Zeta(z);

complexplot3d(f,-1-1*I..1+1*I);
 

solve(f = 1/2 , z ) 

 

Hello;

I am facing "Error, too many levels of recursion" in loops. kindly guide me. Thanks

 

1D1P.mw


 

restart; printlevel := 3

restart; with(LinearAlgebra); with(linalg); with(CodeGeneration); with(plots); Digits := 30; `ε` := 0.1e-1; k := .5; m := 1; c := 1; q := 1

L[time] := 1:

.200000000000000000000000000000

 

.200000000000000000000000000000

 

.200000000000000000000000000000

(1)

``

ICff := 1.0*exp(-p^2/(2.0))*(1.0+epsilon*cos(1.0*k*x))/sqrt(2.0*Pi):

for i from 0 while i <= N[x] do for j from 0 while j <= N[p] do f[0, i, j] := eval(ICff, [x = i*`&Delta;x`, p = j*`&Delta;p`]) end do end do:

for n from 0 while n <= T do for j from 0 while j <= N[p] do f[n, 0, j] := 0; f[n, N[x], j] := 0 end do end do:

for n from 0 while n <= T do for i from 0 while i <= N[x] do f[n, i, 0] := 0; f[n, i, N[p]] := 0 end do end do:

``

for n1 from 0 while n1 <= T-1 do for i1 while i1 <= N[x] do for j1 while j1 <= N[p] do f[n1+1, i1, j1] := f[n1, i1, j1]-`&Delta;t`*j1*`&Delta;p`*(f[n1+1, i1+1, j1]-f[n1+1, i1-1, j1]+f[n1, i1+1, j1]-f[n1, i1-1, j1])/((4*`&Delta;x`)*(1.0)) end do end do end do

Error, too many levels of recursion

 


 

Dear esteem Colleagues,

Please how do I modify the following two files (though similar) to get consistent errors? I am not sure where I made the mistake.

Any modifications would be appreciated.

Thank you all for your time and mentorship. Best regard

Biratu_Mapleprimes.mw

DDE_2_Mapleprime.mw

I would like to emphasize a particular region of my plot by shading the whole strip between x=0 and x=1. I learned of the command shadebetween, but the functions it takes as arguments for the boundaries of the region to shade must be functions of x.

Does someone know how to shade between two vertical lines?

First 225 226 227 228 229 230 231 Last Page 227 of 2308