minhthien2016

320 Reputation

6 Badges

7 years, 42 days

MaplePrimes Activity


These are questions asked by minhthien2016

My code
restart;
reqn:=f(n+1) = f(n)  + sqrt(2*f(n+1)-f(n)):
rsolve({reqn, f(1) = 15},f(n));

I can not get the answer. How can I get the answer?

I am trying to find the integer numbers a, b, c, d, t so that the equation sqrt(a x^2 + b x + c) = d x + t have two integer solutions. My code

First I solve

solve(a*x^2 + b*x + c = (d*x + t)^2, x);

I get

(2*d*t - b + sqrt(4*a*t^2 - 4*b*d*t + 4*c*d^2 - 4*a*c + b^2))/(2*(-d^2 + a)), -(-2*d*t + sqrt(4*a*t^2 - 4*b*d*t + 4*c*d^2 - 4*a*c + b^2) + b)/(2*(-d^2 + a))

And then, I solve
restart;
n := 0;
for a to 10 do
for b to 10 do
for c to 10 do
for d to 10 do
for t to 10 do
mydelta := 4*a*t^2 - 4*b*d*t + 4*c*d^2 - 4*a*c + b^2;
if 0 < mydelta and type(mydelta, integer) then
x1 := (2*d*t - b + sqrt(4*a*t^2 - 4*b*d*t + 4*c*d^2 - 4*a*c + b^2))/(2*(-d^2 + a));
x2 := -(-2*d*t + sqrt(4*a*t^2 - 4*b*d*t + 4*c*d^2 - 4*a*c + b^2) + b)/(2*(-d^2 + a));
if 0 < d*x1 + t and 0 < d*x2 + t and type(x1, integer) and type(x2, integer) and nops({a, b, c, d, t}) = 5 and c <> t^2 and -d^2 + a <> 0 and nops({x1, x2}) = 2 then n := n + 1; L[n] := [a, b, c, d, t]; end if; end if; end do; end do; end do; end do;
end do;
L := convert(L, list);
nops(L);

I don't get any solutions. But, when I  solve(sqrt(2*x^2 + 3*x + 5) = x + 9, x); I get two solutions 19, -4.
Where is wrong in my code?
 

The function f := x -> (x + 1)*(x^2 + (m - 5)*x - 7*m + 2) satifies
solve(discrim(f(x), x) = 0, m) has three solutions 1, -17, -1
How to find the integer numbers a, b, c, d, k, t so that the function 
f := x -> x^3 + (a*m + b)*x^2 + (c*m + d)*x + k*m+t  satifies the equation 

solve(discrim(f(x), x) = 0, m)  has three  integer numbers m?

Consider the function f:=x-> a*x^2 + b*m*x + x^3 + c*m.
I tried
restart;
f := x -> x^3 + a*x^2 + b*m*x + c*m;
solve(f(x) = 0, m);
g := x -> -x^2*(a + x)/(b*x + c);
solve(diff(g(x), x) = 0, x);

restart;
n := 0;
f := x -> -x^2*(a + x)/(b*x + c);
for a from -10 to 20 do
    for b to 20 do
for c from -10 to 20 do
mydelta := a^2*b^2 - 10*a*b*c + 9*c^2;
if 0 < mydelta and type(mydelta, integer) then
x1 := (-b*a - 3*c + sqrt(a^2*b^2 - 10*a*b*c + 9*c^2))/(4*b):
x2 := -(b*a + sqrt(a^2*b^2 - 10*a*b*c + 9*c^2) + 3*c)/(4*b):
x3 := 0:
if type(x1, integer) and type(x2, integer) and nops({0, x1, x2}) = 3 and type(f(x1), integer) and type(f(x2), integer) then n := n + 1; L[n] := [a, b, c]; end if; end if; end do; end do; end do;
L := convert(L, list);


I get
L := [[-10, 1, 6], [-10, 2, 12], [-9, 3, 5], [-8, 1, 10], [-5, 1, 3], [-4, 1, -6], [4, 1, 6], [5, 1, -3], [6, 3, 20], [7, 1, 15], [8, 1, -10], [8, 1, 12], [9, 3, -5], [10, 1, -6], [10, 1, 12], [12, 1, 18], [14, 1, -4], [15, 1, -9], [18, 1, 20], [18, 3, -10], [18, 3, 4], [20, 1, 2]]

With L[1], solve(discrim(x^3 - 10*x^2 + m*x + 6*m, x) = 0, m) ;
The equation has three integer solutions: 0, 12, -500

I have a list:
mylist := [x^4 + (-4*m - 7)*x^3 + (m + 4)*x^2 + (3*m - 5)*x, x^4 + (-4*m - 7)*x^3 + (m + 5)*x^2 + (5*m - 7)*x, x^4 + (-4*m - 7)*x^3 + (m + 5)*x^2 + (7*m - 5)*x, x^4 + (-4*m - 7)*x^3 + (2*m + 5)*x^2 + (3*m - 5)*x, x^4 + (-4*m - 7)*x^3 + (3*m + 1)*x^2 + (7*m - 10)*x, x^4 + (-4*m - 5)*x^3 + (2*m + 1)*x^2 + (7*m - 9)*x]

I use

L := map~(normal, mylist);

and get. 

L := [x^4 - (4*m + 7)*x^3 + (m + 4)*x^2 + (3*m - 5)*x, x^4 - (4*m + 7)*x^3 + (m + 5)*x^2 + (5*m - 7)*x, x^4 - (4*m + 7)*x^3 + (m + 5)*x^2 + (7*m - 5)*x, x^4 - (4*m + 7)*x^3 + (2*m + 5)*x^2 + (3*m - 5)*x, x^4 - (4*m + 7)*x^3 + (3*m + 1)*x^2 + (7*m - 10)*x, x^4 - (4*m + 5)*x^3 + (2*m + 1)*x^2 + (7*m - 9)*x].

I use seq to list L[i] and diff(L[i])

[seq([L[i], diff(L[i], x)], i = 1 .. nops(L))];

and get

[[x^4 - (4*m + 7)*x^3 + (m + 4)*x^2 + (3*m - 5)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(m + 4)*x + 3*m - 5], [x^4 - (4*m + 7)*x^3 + (m + 5)*x^2 + (5*m - 7)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(m + 5)*x + 5*m - 7], [x^4 - (4*m + 7)*x^3 + (m + 5)*x^2 + (7*m - 5)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(m + 5)*x + 7*m - 5], [x^4 - (4*m + 7)*x^3 + (2*m + 5)*x^2 + (3*m - 5)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(2*m + 5)*x + 3*m - 5], [x^4 - (4*m + 7)*x^3 + (3*m + 1)*x^2 + (7*m - 10)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(3*m + 1)*x + 7*m - 10], [x^4 - (4*m + 5)*x^3 + (2*m + 1)*x^2 + (7*m - 9)*x, 4*x^3 - 3*(4*m + 5)*x^2 + 2*(2*m + 1)*x + 7*m - 9]]

How can I insert L'(2), L''(2) and solve the systems L'(2) = 0 and L''(2) > 0 to get the solutions m?
like this
[seq([L[i], diff(L[i], x), solve([L'(2) = 0,L''(2)>0],m) ], i = 1 .. nops(L))]

I also tried
[seq([L[i], diff(L[i], x), eval(diff(L[i], x), x = 2), solve([eval(diff(L[i], x), x = 2) = 0], m)], i = 1 .. nops(L))]

to obtain 
[[x^4 - (4*m + 7)*x^3 + (m + 4)*x^2 + (3*m - 5)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(m + 4)*x + 3*m - 5, -41 - 41*m, {m = -1}], [x^4 - (4*m + 7)*x^3 + (m + 5)*x^2 + (5*m - 7)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(m + 5)*x + 5*m - 7, -39 - 39*m, {m = -1}], [x^4 - (4*m + 7)*x^3 + (m + 5)*x^2 + (7*m - 5)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(m + 5)*x + 7*m - 5, -37 - 37*m, {m = -1}], [x^4 - (4*m + 7)*x^3 + (2*m + 5)*x^2 + (3*m - 5)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(2*m + 5)*x + 3*m - 5, -37 - 37*m, {m = -1}], [x^4 - (4*m + 7)*x^3 + (3*m + 1)*x^2 + (7*m - 10)*x, 4*x^3 - 3*(4*m + 7)*x^2 + 2*(3*m + 1)*x + 7*m - 10, -58 - 29*m, {m = -2}], [x^4 - (4*m + 5)*x^3 + (2*m + 1)*x^2 + (7*m - 9)*x, 4*x^3 - 3*(4*m + 5)*x^2 + 2*(2*m + 1)*x + 7*m - 9, -33 - 33*m, {m = -1}]]

I want to write the expresstion x^3 + (-m - 1)*x^2 + (-4*m - 3)*x in the form x^3 - (m-1) x^2 - (4m + 3). I tried
collect(expand(x^3 + (-m - 1)*x^2 + (-4*m - 3)*x), x)

I get x^3 + (-m - 1)*x^2 + (-4*m - 3)*x

1 2 3 4 5 6 7 Last Page 1 of 15