Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 310 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

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 ab[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.

From the menus in Maple, do Tools => Check for Updates. If there's an update available, then the dialog box will give you the option to download and install it.

VV's Answer addresses the major mathematical issue of your Question. In addition, I've noticed several little things that could be done better:

  1. The assume is unnecessary; evalc and the numeric integrators handle this automatically.
  2. Important: You should replace Re(evalc(...)) with evalc(Re(...)) in both places that you use it. This will produce much simpler expressions.
  3. Both f1 and f2 are even functions of x, so you can integrate from to infinity and double the result.
  4. The two integrands can be added and done as a single integral.

There are two workarounds: interface(showassumed= 0) or interface(showassumed= 2). With either of these, you'll also no longer see the trailing ~.

First 114 115 116 117 118 119 120 Last Page 116 of 395