Carl Love

Carl Love

28160 Reputation

25 Badges

14 years, 9 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

plots:-fieldplot3d([-x, y, cos(z)], x= -Pi..Pi, y= -Pi..Pi, z= -Pi..Pi);

In addition to all the usual options for 3d plots, there are a vast number of options to control the length, thickness, color, style, placement, and number of arrows (see help page ?fieldplot3d).

Add the clause assuming y > 0 to your simplify command.

If you read the algorithm-details page that your linked page links to, you'll see that they start from a massive database of precomputed values. That database likely takes up most of a large disk drive. If you want a good estimate that'll be returned instantly:

Digits:= 15:
trunc(evalf(Li(6469693230)));

I know virtually nothing about integral equations, but the following totally ad hoc seat-of-the-pants method converges quickly to a solution:
 

> 

restart:

> 

Veq:= 3/2-9/2*exp(-2*x)-9/2*exp(-x)+1/2*int(exp(-y)*Z(x-y), y= 0..ln(2));

3/2-(9/2)*exp(-2*x)-(9/2)*exp(-x)+(1/2)*(int(exp(-y)*Z(x-y), y = 0 .. ln(2)))

> 

eps:= 1e-4:
S[0]:= 3/2:

> 

for n do
    S[n]:= unapply(eval(Veq, Z= S[n-1]), x)
until
    evalf(Int(abs@(S[n]-S[n-1]), 1.5..3.5)) < eps
:

> 

n;

12

> 

plot(S[n], 1.5..3.5);

> 

 


 

Download IntEq.mw

Steps:

  1. Make g simply the piecewise expression, without the x-> part.
  2. Change the range to x= -5..5.
  3. Change discont= true to discont= [showremovable].
  4. Add undefined as a last argument to piecewise. (This is so that it doesn't default to 0 for the unspecified gaps.)

Either replace the keyword trig with arctrig, or remove it entirely.

I can find no help page for simplify(..., arctrig), but showstat(`simplify/arctrig`) shows that it exists.

There's a simple closed-form solution for arbitrary a, b[0], b[1], b[2], and u[1]. Take the expanded u[10], for example, and collect wrt the bs. The leading term is a^9*u[1]. The coefficient of each of the bs is a geometric sum of powers of a^3.

I'm recovering from the flu at the moment, and I don't have the energy to work out all the details at the moment.

The whole group can be created with a single cat command; no loop is needed:

ourfile:= cat("C:/Users/Tamour Zubair/Desktop/AA/T[", 1..5, "].dat");

Yes, you can substitute the identity function or any other function:

eval(Sol, _F1= (x-> x));

where Sol is whatever you named the solution.

Your curve can be parameterized to a space curve, which can be plotted with tubeplot, which unlike spacecurve does accept the colorscheme option with suboption xyzcoloring.

restart:
S1:= x*y+y*z+x*z = 0:
S2:= x+y+z = 5:
E:= eliminate({S1,S2}, z);
Polar:= {x= r*cos(t), y= r*sin(t)}:
R:= solve(eval(E[2], Polar), r);
XYZ:= combine(eval[recurse]([x,y,z], Polar union E[1] union R[2])); 
plots:-tubeplot(
    XYZ, t= -Pi..Pi, radius= .2, numpoints= 300, 
    colorscheme= ["xyzcoloring", `*`], style= surface, scaling= constrained
);

 

Change %a to %q. 

The worksheet has numerous comments interspersed with the code. That is the problem. If comments appear within an "execution group", then they need to be designated as comments by preceding them (on each line) with #. (And in 1D input, comments can be enclosed with (*  *)​​​​​​ and split over multiple lines.) An execution group can also be turned into a text block (no code) and then the text can be formatted like in a word processor.

@aabdulla Here is why add works and sum doesn't.

  1. Your procedure c isn't prepared to handle nonnumeric values of its parameter k. (It could be easily modified to handle them.)
  2. The sum command evaluates its summand before assigning numeric values to its index variable (q in this case). So, the recursive call c(k - q) is processed for symbolic q.
  3. The add command evaluates its summand after assigning numeric values to its index variable.

Are you trying to write an equation that'll be solved for a variable, possibly x31? Then use = rather than :=.

Another option---not mentioned by Georgios and midway between the options that he did mention---is a Code Edit Region. This is an embedded component in a worksheet that gives you a fairly standard WYSIWYG plain-text code editor with syntax highlighting. You can get it by placing your cursor where you want the embedded component, then using the menu Insert => Code Edit Region. You execute (or syntax check) the code by right-clicking in the region and selecting Execute Code. Estimated locations of syntax errors are shown by tiny red squiggles in the code. They're a bit difficult to see if you're not used to them (at least if you use Zoom Factor 75%). I tend to use these Regions for codes of between 50 and 500 lines. 

Warning: There may be some bad behavior if you leave the first line blank. So, at least put a comment on the first line of your Code Edit Region.

First 115 116 117 118 119 120 121 Last Page 117 of 396