Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are answers submitted by Carl Love

sys:= diff(y(t),t) + diff(z(t),t) = t,
 diff(y(t),t) - 2*diff(z(t),t) = t^2:
ic:= y(0)=1, z(0)=2:
dsolve({sys,ic});

Here are the details of the process that I outlined above. Sorry about the formatting. The uploading of worksheets for display is broken. But you can download the worksheet below.

restart:
f:= x-> (6+6*x^2-x^3)/(1+x^4);
               2     3
     6 + 6 x  - x
x -> -------------
                4    
        1 + x     
d:= simplify(D(f)(x));
                 /   5         4        2              \
               x \x  - 12 x  - 24 x  - 3 x + 12/
               ---------------------------------
                                     2            
                           /  4     \             
                           \x  + 1/

Note that the denominator is always positive. So the sign is determined strictly by the numerator.  Since the numerator is a polynomial, I extract it because fsolve will give all the real roots of a polynomial.

R:= fsolve(numer(d), x);
  -0.685015447205253, 0., 0.601983907155496, 12.1633393136672

Now I plug in a sample point in each of the intervals determined by these roots. All that matters is whether the answer is positive or negative.


D(f)(-1.);
                        5.50000000000000
D(f)(-.5);
                       -2.97577854671281
D(f)(.5);
                        1.67474048442907
D(f)(1.);
                       -6.50000000000000
D(f)(13.);
                       0.0003900695534267


So, the function is increasing on the intervals (-infinity, -0.685), (0, 0.602), and (12.2, +infinity)

derivative.mw

You have this line in your code:

dRoutside := (x,l) -> (rhs(Soutside(x)[3])*x-(rhs(Soutside(x)[2]))(1+l))/(x^(2+l));

It should be:

dRoutside := (x,l) -> (rhs(Soutside(x)[3])*x-(rhs(Soutside(x)[2]))*(1+l))/(x^(2+l));

So, yes, the formula which you derived by the chain rule was wrong.

If you add the multiplication sign, then all the plots match up as far as can be determined with the naked eye.

To convert from the string form back to the Matrix form, we need to know the dimensions of the Matrix because this information is not encoded in the string.

So, given that you know that you want a 4x11 Matrix, and that b is the string form, do this:

a:= Matrix(4, 11, (i,j)-> parse(b[(i-1)*11+j]));

Maple does evaluate the integrals: It says that the answer is undefined, and that is the correct answer. (In your post, you incorrectly use eval on the integrals. But you have the correct evalf in your attached worksheet.) The plots in your worksheet clearly show that the limits are oscillatory, hence undefined.

If Maple could not the evaluate the integrals, then it would've returned the integrals unevaluated.

 

See ?combinat,randcomb .

Enter the sum like this

Sum((k^2+k-1)/(k+2)!, k= 1..infinity);
value(%);

You should get the answer 1/2.

I don't understand your integral. Clearly it diverges if taken literally:

assume(A>0);
Int(X/(X-A)*(X-1), X= 0..infinity) ;
or
Int(X/(X-A)/(X-1), X= 0..infinity) ;

Either way it diverges. So, could you write it more clearly?

 

This is how to step through the basis, setting each basic variable to 1 and the others to 0, and evaluating your Zs in light of this. If you post an actual example, I'll show you how to apply this to it.

Sol:= solve(sys, vars):
Basic,NonBasic:= selectremove(evalb, Sol):
Basic:= op~(Basic):
for v in Basic do
     Evals:= {v= 1} union (Basic minus {v} =~ 0);
     eval(Zs, eval(NonBasic, Evals) union Evals)
od:

Eq:= (x^2+y^2)^2=(x^2-y^2):
subs(x= r*cos(theta), y= r*sin(theta), Eq);

combine(%);

%/r^2;

 

Change the return line to

return convert(orbit, list)

 

The result needs to be a string (or a name), because an integer can't have the leading zeros. Here's how to make the string:

b:= cat("", op~(convert(a, listlist))[]);

TypeTools:-AddType(Point, [realcons,realcons]):
~set:= x-> convert(x, set):
~list:= x-> convert(x, list):

ThreeIneqs:= proc(A::Point, B::Point, C::Point, XY::[name,name])
uses G= geometry;
local p, a, b, c, L, S:= {A,B,C};
     seq(
          (Eq-> `if`(eval(Eq, XY=~p) < 0, 1, -1)*Eq <= 0)
          (lhs(G:-Equation(
               G:-line(L, (P-> [G:-point(a, P[1][]), G:-point(b, P[2][])])(S minus {p})),
               XY
          ))),
          p= S
     )
end proc:

NumbTrue:= proc(S::~list(boolean), Evals::{set,list}(name=anything))
local r;
     r:= is~(eval(S,Evals));
     `if`(has(r, FAIL), FAIL, numboccur(r, true))
end proc:

TwoOrMore:= proc(Tri::~set(Point), P::Point)
local x,y;
     evalb(NumbTrue([ThreeIneqs(Tri[], [x,y])], [x,y]=~P) > 1)
end proc:

Example:
   
TwoOrMore([[2,3], [4,5], [8,2]], [4,4]);

                                          true

You have two errors:

  1. Pi must be spelled with capital P and lowercase i,
  2. polarplot should be plots:-polarplot.

It can be done with geom3d:-intersection. In particular, if the result of this command is not NULL, then the input objects intersect.

It can be done in two steps:

convert(s, trig);
combine(%);

First 336 337 338 339 340 341 342 Last Page 338 of 395