Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Procedure in maple

  1. Sep 28, 2005 #1
    Having a problem with a procedure

    the procedure is

    > proc1:=proc(f,a,b,xmin,xmax)
    > local locallist;
    > locallist:=[seq(rhs(f),_C1=a..b)];
    > RETURN(locallist);
    > end;

    the test function I am using for f is

    DE_soln = y(x) = (arctan(x)+_C1)/(1+x^2)^2;

    Which I got from using the dsolve for a differential equation

    When I generated a sequence of this externally (not using the procedure)

    with the following command

    DE_soln_list := [seq(rhs(DE_soln),_C1=-2..2)];

    I got a set of 5 solutions with just had the _C1 replaced by -2,-1,0,1,2 in each respective 'solution'

    When I try plugging DE_soln into the procedure, it returns a list of 5 solutions, but all in the form (arctan(x)+_C1)/(1+x^2)^2

    _C1 was simply a variable created by dsolve when solving the differential equation.

    How do I get the procedure to sub in the numbers for _C1, because it seems that it works differently inside the procedure (I tried to declare _C1 as a local variable inside the procedure but that did nothing)

  2. jcsd
  3. Sep 29, 2005 #2
    I've honestly tried everything I can think of and looked on ever maple forum. Maybe I'm missing something...
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Procedure in maple
  1. Maple procedure (Replies: 0)