0
$\begingroup$

I have tried in vain to recover problems from a flat file and from a pdf and pass them through the reduce option and have it solve the exercises one by one in batches. Any idea how to achieve it? The only thing I can think of is this instruction in its plain text version and in its pdf version

data = ReadList["https://www.dropbox.com/s/0novhzk3u0v15ix/e1.txt?dl=0", Word,RecordLists -> True];

data = ReadList["https://www.dropbox.com/s/ayr4jzgkihsly7e/e2.pdf?dl=0", Word,RecordLists -> True];

edit

Ready ReadList["https://drive.google.com/file/d/14GnPbm5LvANvtcOSxyFM3n9_x0VU6BIZ/view?usp=share_link", Word,RecordLists -> True];

ReadList["https://drive.google.com/file/d/1F20ABqN7Pz6ZYznsPR-e35VHqywwVexl/view?usp=share_link", Word,RecordLists -> True];

$\endgroup$
2
  • $\begingroup$ The link leads to an Error (500) page. Please provide a 1-click accessible link that is public. $\endgroup$
    – Syed
    Apr 11, 2023 at 2:52
  • 1
    $\begingroup$ Syed , Hello, the links work for me, but I put new links to drive,see edit $\endgroup$
    – zeros
    Apr 11, 2023 at 3:51

1 Answer 1

2
$\begingroup$
(data3 = ReadList["C:/e1.txt", "String", 
    RecordLists -> True]) // TableForm

data4a = StringTrim[First /@ data3, 
  StartOfString ~~ Shortest[__] ~~ ") "]

data4 = ToExpression@data4a

res = Reduce[#, x] & /@ data4

(data5 = Join[{{"#", "expr", "sol"}}, 
    Transpose[{Range@Length@data4, data4a, res}]]) // 
 Grid[#, Spacings -> {2, 1}, Alignment -> Left] &

$$\left( \begin{array}{ccc} \# & \text{expr} & \text{sol} \\ 1 & \text{x/(x-1)$<$1 } & x<1 \\ 2 & \text{2x/(2x+1)$>$1} & x<-\frac{1}{2} \\ 3 & \text{-2x/(3-x)$<$=2} & x<3 \\ 4 & \text{-3x/(2-x)$>$=3} & x>2 \\ 5 & \text{(x+1)/(2x-1)$<$1/2} & x<\frac{1}{2} \\ 6 & \text{2x/(3x-2) $>$2/3} & x>\frac{2}{3} \\ 7 & \text{(3x-1)/(1-2x)$<$=-3/2} & x>\frac{1}{2} \\ 8 & \text{2/(1-x)$<$2} & x<0\lor x>1 \\ 9 & \text{3/(2x-1)$<$=1} & x<\frac{1}{2}\lor x\geq 2 \\ 10 & \text{1/(2x+3)$>$=1} & -\frac{3}{2}<x\leq -1 \\ 11 & \text{(2x+1)/(x+2)$<$1} & -2<x<1 \\ 12 & \text{(x-2)/(2x+3)$>$1} & -5<x<-\frac{3}{2} \\ 13 & \text{(x-2)/(2-x)$<$=1} & x\in \mathbb{R} \\ 14 & \text{(2x+1)/(2x+1)$<$=2} & \text{True} \\ 15 & \text{(2-x)/(x-1)$>$=2} & 1<x\leq \frac{4}{3} \\ 16 & \text{(2-x)/(1-2x)$<$=2} & x\leq 0\lor x>\frac{1}{2} \\ 17 & \text{(2-4x)/(2x-1) $<$=2} & x\in \mathbb{R} \\ 18 & \text{(x+2)/(x+1) $<$(x-2)/(2x+2)} & -6<x<-1 \\ 19 & \text{x / (x-2) $>$= 2 /(2x-4) } & x\leq 1\lor x>2 \\ 20 & \text{(x+2)/(x-1) +x/(2x-2)$<$=0} & -\frac{4}{3}\leq x<1 \\ 21 & \text{(x+1)/(2x+1)-1/(4x+2) $<$=1} & x\in \mathbb{R} \\ 22 & \text{1/(x-1)-1/(2x-2)$>$=1} & 1<x\leq \frac{3}{2} \\ 23 & \text{x/(x-2) -(x+1)/(2x-4) $>$=0} & x\leq 1\lor x>2 \\ 24 & \text{(x+1)/(x-1) +(2x-1)/(2x-2)$>$=1} & x\leq -\frac{3}{2}\lor x>1 \\ \end{array} \right)$$

$\endgroup$
2
  • $\begingroup$ wow , It's just what I thought, my most difficult question, it can be done from a pdf (attach one there) $\endgroup$
    – zeros
    Apr 11, 2023 at 17:42
  • 1
    $\begingroup$ I don't have the skill to extract data out of the pdf. I did try "Plaintext". Please wait and someone might provide an answer in due time. $\endgroup$
    – Syed
    Apr 11, 2023 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.