Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@as5987 

You are failing to understand the most basic things that I am telling you, and I am getting frustrated. Perhaps you need someone who knows both English and your native language to interpret my responses for you.

WHY ARE YOU EXPLICITLY SELECTING THE SECOND POINT RETURNED BY solve WHEN YOU WANT THE FIRST POINT?!?! THE CODE Sol[2,1] AND Sol[2,2] EXPLICITLY SELECTS THE SECOND POINT.

 

restart:

#Procedure to compute the distance between 2 points.
dist:= proc(Pt1,Pt2)
option inline;
     evalf(sqrt(`+`(((Pt1 -~ Pt2)^~2)[])))
end proc:


#Procedure to select from a list of points (in equation form) that one
#which is closest to a given point (the origin by default).
Closest:= proc(

     Sol::list(list(name=numeric)),

     {To::list(numeric):= [0,0],

      XY::list(name):= ['x', 'y']

})

local

     Min:= infinity, ptMin, pt, d;

     for pt in Sol do

          d:= dist(eval(XY, pt), To);

          if d < Min then Min:= d; ptMin:= pt end if

     end do;   

     ptMin

end proc:  

 

CirEq1:= (x-1)^2+(y-1/.3)^2 = (1/.3)^2:

CirEq2:= (x-.4/(1+.4))^2+y^2 = 1/(1+.4)^2:

Sol:= solve({CirEq||(1..2)}, [x,y]);

[[x = -.365853658536586, y = .292682926829267], [x = 1.00000000000000, y = -0.166666666666667e-14]]

#DON'T SELECT THE SECOND POINT! Select the point closest to the origin.
Pt:= eval([x,y], Closest(Sol));

[-.365853658536586, .292682926829267]

DocumentTools:-Do(sc= dist(Pt, [0,0])):

cir1:= plottools:-circle([0,0], sc):

Point2:= plottools:-disk(Pt, 0.2e-1, color= red):

plots:-display([cir1, Point2], gridlines= false);

 

``

 

Download circles.mw

@Kitonum 

I was aware that you could pass the appropriate field extension to factor. But I didn't mention it because I know of no way to get Maple to say that that is the right extension to use. Do you know a way?

@descartes0000 

It's a good question. You can do a partial-fraction decomposition with complex linear (i.e., first degree) factors the same way that you do it with real linear factors. For example (x^2 + 1) factors as (x-I)*(x+I). The decompostion of 2/(x^2+1) is

convert(2/((x+I)*(x-I)), parfrac);

However, you never need to use a complex factorization when integrating a real rational function. This is because any real polynomial can be factored into real factors of degree at most two, even if all the roots of the polynomial are complex. However the coefficients may be irrational. One gets these factors in Maple by including the real argument to factor. For example,

factor(x^4+1, real);

Since the integral of any real rational function with denominator degree 2 is known, this is enough integrate any real rational function.

 

@k20057 5 

Ah. If you want to see both then do this:

n:= 5:
S:= 'R()' $ n;
map(lhs=rhs/n, Statistics:-Tally(op~([S])));

An aside: This has nothing to do with your error message. Your model is linear, and you'll likely get better results using LinearFit. The v^2 does not make it nonlinear. The significant thing is that your model is a linear function of the parameters a, b, and c; the type of function that it is with respect to v is irrelevant.

What makes you think that there are more roots than the seven reported by RootFinding:-Analytic? The 3d plots that I have made lead me to believe that those are the only seven roots.

@as5987 

If you say Sol[2,1] and Sol[2,2] then you are explicitly selecting the second point! If you want the first point, then use Sol[1,1] and Sol[1,2]. But why don't you use my selection procedure?

Which intersection do you want: the (setwise) intersection of two bases or a basis for the subspace which is the intersection of the subspaces spanned by two bases? There is hardly any practical value to the former, so I think that you want the latter, which is what is returned by IntersectionBasis. But don't conflate this with Maple's setwise intersect operator.

Please show some actual code so that I can give you better advice.

@as5987 

The initial arguments to display must be plot structures, not something arbitrary like [3,5].

plot_circle:= plot([r*cos(t), r*sin(t), t= -Pi..Pi]):
plots:-display:= (plot_circle, view= [-10..10, -10..10]);

Could you provide some more details, perhaps a small example done by hand?

@as5987 

Point2:= [3,5]:
r:= evalf(sqrt(`+`((Point2^~2)[]))):
plot([r*cos(t), r*sin(t), t= 0..2*Pi]);

@k20057 5 

I don't know what you mean. Is this it?

n:= 5:
'R()' $ n;

@Markiyan Hirnyk 

Yes, that's why I called it a simulation.

But it does prove that if the question has a unique answer, then that answer must be 4.

Do you even have access to Maple? Haven't you learned from your previous Questions and their Answers how to enter a matrix and find its reduced row-echelon form with Maple?

Putting "quick help please!" in your titles does not help your case. It makes you seem like someone who is not even trying to do their homework.

There is no ODE system shown in your Question. Perhaps you meant to attach a file?

First 533 534 535 536 537 538 539 Last Page 535 of 709